This repository contains Gen AI projects that performs different tasks
This project demonstrates a simple AI storytelling system using the GPT-2 model from Hugging Face Transformers. It generates creative continuations of a story based on a user-provided prompt and explores how various text generation parameters influence the style and output of the generated content.
-
Load and use the GPT-2 model from Hugging Face
-
Accept a text prompt from the user
-
Generate a creative story continuation
-
Experiment with different generation settings:
-
1.temperature
-
2.top_k
-
3.max_length
-
-
Display generated outputs clearly for comparison
-
Provide a short reflection on how parameter changes affect storytelling
-
Understand how GPT-2 generates text
-
Learn how generation parameters impact creativity and coherence
-
Gain hands-on experience using Hugging Face's transformers library
-
A Jupyter Notebook containing:
-
GPT-2 loading and prompt input
-
At least 3 different user prompts and generated stories
-
Experimentation with generation settings
-
A 4-5 line reflection on parameter impact
-
Python 3.6+
-
Jupyter Notebook/Google Colab
-
Install the required libraries:
- pip install transformers torch
A short section comparing how changes to temperature and top_k affect the tone, randomness, and creativity of the generated text.