# 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
-
Install the required Python packages:
pip install -r requirements.txt
-
Navigate to the project directory.
-
Run the Flask application:
python app.py
-
Open a web browser and go to
http://localhost:5000
to access the application.
-
Create an Azure App Service for Python.
-
Set up deployment options (Azure CLI, GitHub Actions, Azure DevOps, etc.).
-
Configure environment variables and settings as required.
-
Deploy the application to Azure App Service.
-
Access the deployed application via the Azure App Service URL.