armanashrafansari/ai_chatbot
0
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
๐ค AI Chatbot with Gemini & OpenAI Agents
An AI chatbot project powered by Google Gemini and OpenAI models using an agentic framework. Built with FastAPI and Chainlit, containerized using Docker, managed with `uv`, and deployed via Hugging Face Spaces.
๐ข Live App: Demo <p align="center"> <img src="public/PROJECT_UI.jpg" alt="Project Logo" /> </p>
๐ Features
- ๐ Chainlit-powered web UI with starter prompts
- ๐ง Agent-based logic using OpenAI SDK + Gemini models
- โก FastAPI backend for API flexibility
- ๐จ Styled with
custom.cssfor a clean UI - ๐ณ Docker-ready for consistent environments
- โ๏ธ Deployable on Hugging Face Spaces Hey, Cortana. ---
๐งฉ Tech Stack
โ๏ธ Setup Instructions
1. Clone the Repository
git clone https://github.com/arman229/ai_chatbot.git
cd ai_chatbot2. Create a Virtual Environment
Using `uv`:
uv venv
.venv\Scripts\activate
uv pip install pyproject.toml
3. Configure Environment
Create a .env file in the root directory:
GEMINI_API_KEY=your_gemini_api_key_here4. Run Locally
Start FastAPI backend:
uvicorn chatbot.main:app --reloadAccess it at: http://localhost:8000
๐ณ Docker Usage
Build the Image
docker build -t ai_chatbot .Run the Container
docker run -p 8000:8000 ai_chatbot๐ Deployment on Hugging Face
- Create a new Space on Hugging Face.
- Choose "Docker" as the runtime.
- Connect your GitHub repo or manually upload your project.
- Hugging Face will automatically build and deploy your app.
