Skip to content

shruthiLearns/Generative-AI-Projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published