Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chain Text Generator (with Flask backend & Hugging Face)

Backend Setup

  1. Install dependencies:

    pip install -r requirements.txt
    
  2. Create a .env file and add your Hugging Face API key:

    HF_API_KEY=your_huggingface_api_key_here
    
  3. Start the backend:

    python app.py
    

    The backend will run locally on http://localhost:5000/generate


Frontend Setup

  1. Place index.html, style.css, and script.js in the same folder.
  2. Open index.html in your browser.
  3. Make sure your backend is running and accessible at http://localhost:5000.

Usage

  • Enter a prompt and click "Generate".
  • The generated text will appear below.

Notes

  • The API key in .env is secret – never upload .env to GitHub.
  • For public hosting, update the URL in script.js if the backend is not localhost.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages