Prompt Story Generator is an interactive storytelling system designed to generate and evaluate creative stories using advanced prompting techniques, including zero-shot, few-shot, and reflexion prompting. This system allows users to select a story title and genre or provide custom prompts, leveraging a fine-tuned GPT model to create tailored stories. It evaluates generated stories using robust metrics like ROUGE, BLEU, METEOR, and coherence, providing insights into the effectiveness of different prompting strategies.
- Story Generation: Supports zero-shot, few-shot, and reflexion prompting techniques for diverse story outputs.
- Evaluation Metrics: Analyzes generated stories using ROUGE, BLEU, METEOR, and coherence metrics.
- Visualization: Graphically compares prompting strategies and their effectiveness.
- Interactive Interface: Simple web interface to select titles, genres, or provide custom prompts.
- Install Anaconda
- Clone this repository:
git clone https://github.com/srinivas-badiga/Story_Generation_and_Prompt_Evaluation.git
-
Navigate to the project directory:
cd Story_Generation_and_Prompt_Evaluation
-
Create a virtual environment using
conda
:conda create -n test python=3.10 conda activate test
-
Install
pip
and the required dependencies:conda install pip pip install -r requirements.txt
-
Download the necessary NLP model:
python -m spacy download en_core_web_md
-
Run the Flask application:
python app.py
-
Open your web browser and go to:
http://127.0.0.1:5000
- User Input: Select a story title and genre or provide a custom prompt via the web interface.
- Story Generation: The backend generates stories using the selected prompting technique.
- Evaluation: Generated stories are evaluated using ROUGE, BLEU, METEOR, and coherence metrics.
- Visualization: Results are displayed with scores and comparative graphs.
app.py
: Main Flask application.templates/
: HTML templates for the web interface.static/
: CSS and JavaScript files for styling and interactivity.data.csv
: Dataset containing story titles and reference stories.requirements.txt
: List of dependencies for the project.
- Python 3.10
- Flask
- OpenAI GPT API
- spaCy
- Matplotlib
This project is open-source and available under the MIT License.
- Dataset: ROCStories-MOD
- LLM: Fine-tuned GPT model for storytelling.