This project implements automated script generation using transformer-based machine learning models like GPT-2, GPT-3, and LLaMA. It fine-tunes pre-trained models on a dataset of movie scripts to generate coherent and contextually relevant dialogues.
- Fine-tuning GPT-2 on a custom dataset
- Deploying the model on Hugging Face Spaces
- Exposing API for chatbot interaction
- Integrating with a React frontend
The model is deployed on Hugging Face Spaces using Gradio, which provides a user-friendly web interface for interaction. Below are the steps involved in deployment:
-
Prepare the Model:
- Use
transformersfrom Hugging Face to load and fine-tune GPT-2 on a dataset of movie scripts. - Save the trained model and tokenizer for deployment.
- Use
-
Create a Hugging Face Space:
- Navigate to Hugging Face Spaces and create a new space.
- Select
Gradioas the application type.
-
Upload the Model and Code:
- Push the fine-tuned model and script files to the space repository using Git.
- Implement a
Gradiointerface for real-time text generation.
-
Expose the API:
- The Gradio interface runs on
server_name="0.0.0.0", server_port=7860. - The model API is available for integration with external applications like a React frontend.
- The Gradio interface runs on
Click the link below to interact with the AI script generator:




