An open API service indexing awesome lists of open source software.

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

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.