Skip to content

Jpifer13/personal_llm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Text Generation with GPT-2

This project is a web application that uses FastAPI and React to generate text using GPT-2.

Prerequisites

  • Python 3.12^
  • Node.js and npm
  • Poetry

Setup and Running

Backend Setup

  1. Clone the repository:

    git clone <repository-url>
    cd <repository-directory>
  2. Install the required Python packages using Poetry:

    poetry install
  3. Activate the virtual environment:

    poetry shell
  4. Start the FastAPI backend:

    uvicorn app:app --reload

Frontend Setup

  1. Navigate to the ui directory:

    cd ui
  2. Install the required Node.js packages:

    npm install
  3. Build the React app:

    npm run build
    cd ..

Running the Application

  1. Ensure the backend is running:

    uvicorn app:app --reload
  2. Access the application:

    Open your web browser and go to http://127.0.0.1:8000/.

Notes

  • The React app will be served from the FastAPI backend.
  • Enter a prompt and see each new generated text response appear in a new text box under the previous responses, with the results container automatically scrolling to the latest response as it is being typed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published