https://github.com/shruthilearns/generative-ai-projects
temThis repository contains Gen AI projects that performs different tasks
https://github.com/shruthilearns/generative-ai-projects
encoder-decoder generative-ai gpt-2 gpt2lmheadmodel gpt2tokenizer huggingface-transformers pipeline temperature text-generation top-k
Last synced: 4 months ago
JSON representation
temThis repository contains Gen AI projects that performs different tasks
- Host: GitHub
- URL: https://github.com/shruthilearns/generative-ai-projects
- Owner: shruthiLearns
- Created: 2025-05-20T00:28:28.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-20T00:49:44.000Z (about 1 year ago)
- Last Synced: 2025-06-17T16:44:51.296Z (12 months ago)
- Topics: encoder-decoder, generative-ai, gpt-2, gpt2lmheadmodel, gpt2tokenizer, huggingface-transformers, pipeline, temperature, text-generation, top-k
- Homepage:
- Size: 521 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Generative-AI-Projects
This repository contains Gen AI projects that performs different tasks
# PROJECT 1: TEXT GENERATION: AI Storyteller – Text Generation with GPT-2
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.
## Features
- 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
## Objectives
- Understand how GPT-2 generates text
- Learn how generation parameters impact creativity and coherence
- Gain hands-on experience using Hugging Face's transformers library
## Deliverables
- 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
## Requirements
- Python 3.6+
- Jupyter Notebook/Google Colab
- Install the required libraries:
- pip install transformers torch
## Reflection
A short section comparing how changes to temperature and top_k affect the tone, randomness, and creativity of the generated text.