Skip to content

An interactive application leveraging a pre-trained language model (GPT-2) to generate human-like text from user prompts. Create stories, reports, dialogues, and more! πŸ€–

Notifications You must be signed in to change notification settings

LakshayD02/Natural_Language_Generation_AIModel_Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Natural_Language_Generation_Model_Python ✍️

Description

This Python application uses the powerful GPT-2 language model to generate human-like text based on user-provided prompts. It provides an interactive interface where users can input prompts and view the generated text in real-time. The application also calculates a simple coherence score to give users insight into the quality of the generated text. This tool is versatile and can be used for creative writing, brainstorming, content generation, and educational purposes.

Features

  • Text Generation: Generates human-like text using the pre-trained GPT-2 language model. 🧠

  • Prompt-Based Input: Users provide prompts to guide the text generation. ⌨️

  • Real-time Output: Displays the generated text in real-time. ⏱️

  • Coherence Evaluation: Calculates a coherence score based on sentence length to assess text quality. 🧐

  • Interactive Interface: User-friendly graphical interface for easy interaction. πŸ‘

  • Versatile Text Generation: Can generate various text types (stories, reports, dialogues, etc.). πŸ“–

Technologies Used

  • Python: The primary programming language. 🐍

  • Transformers (Hugging Face): Provides access to the GPT-2 language model. πŸ€—

  • tkinter: Used for creating the graphical user interface (GUI). πŸ–₯️

Ideal For

  • Creative Writers: Generating story ideas, overcoming writer's block, and exploring new narratives. ✍️

  • Content Creators: Drafting content quickly, brainstorming topics, and generating marketing copy. πŸ“

  • Educators: Creating writing prompts for students and exploring creative writing techniques. πŸ‘¨β€πŸ«

  • Students: Improving writing skills and exploring different writing styles. πŸ§‘β€πŸŽ“

  • Anyone: Interested in natural language generation and exploring the capabilities of GPT-2. 🌍

How to Run

  1. Clone the repository: git clone <repo url>

  2. Install required libraries: pip install transformers tkinter

  3. Run the application: python text_generator.py (or python3 text_generator.py)

Website Look

SS-1
SS-1

About

An interactive application leveraging a pre-trained language model (GPT-2) to generate human-like text from user prompts. Create stories, reports, dialogues, and more! πŸ€–

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages