Ahmad Tawil

CSS · Shipped

GenAI Chatbot Site

A simple ChatGPT-like chatbot website built with Python and Flask.

PythonFlask

A simple ChatGPT-like chatbot website built with Python (Flask) and Hugging Face.

Quick Start #

# 1) Create and activate virtual environment
python -m venv .venv
# Windows:
.venv\Scripts\activate
# macOS/Linux:
# source .venv/bin/activate

# 2) Install dependencies
pip install -r LLM_application_chatbot/requirements.txt

# 3) Run the Flask app
python app.py
# Server runs at: http://127.0.0.1:5000

API #

POST /chatbot #

Request Body

{ "prompt": "Hello" }

Response

{ "response": "Hi!" }

Frontend #

Open http://127.0.0.1:5000 in your browser to use the web interface.

Notes #

  • If you open the HTML from file://, enable CORS in Flask.
  • Set your model keys in .env (copy from .env.example).

License #

MIT