Skip to content

GPT-2 is an advanced language model developed by OpenAI, serving as a predecessor to GPT-3. It is based on the Transformer architecture, specifically designed for natural language processing tasks.

Notifications You must be signed in to change notification settings

Nishant2018/TextGeneration-GPT-2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# GPT-2 Text Generation Project

This project demonstrates text generation using OpenAI's GPT-2 model with a Flask web application. Users can input a prompt, specify the maximum length of the generated text, and get the output generated by GPT-2.

## Project Structure

- `app.py`: Flask application file.
- `templates/`: Contains HTML templates for the web interface.
- `static/css/`: Contains CSS stylesheets for the web interface.
- `static/img/`: Contains images used in the web interface.
- `requirements.txt`: List of Python dependencies.

## Prerequisites

- Python 3.x installed
- Pip package manager
- Azure account (for deployment to Azure)

## Installation

1. Clone the repository:

   ```bash
   git clone https://github.com/your-username/gpt2-text-generation.git
   cd gpt2-text-generation
  1. Install the required Python packages:

    pip install -r requirements.txt

Running the Project Locally

  1. Navigate to the project directory.

  2. Run the Flask application:

    python app.py
  3. Open a web browser and go to http://localhost:5000 to access the application.

Deploying to Azure

  1. Create an Azure App Service for Python.

  2. Set up deployment options (Azure CLI, GitHub Actions, Azure DevOps, etc.).

  3. Configure environment variables and settings as required.

  4. Deploy the application to Azure App Service.

  5. Access the deployed application via the Azure App Service URL.

About

GPT-2 is an advanced language model developed by OpenAI, serving as a predecessor to GPT-3. It is based on the Transformer architecture, specifically designed for natural language processing tasks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published