CoolFace
Apppublic

armanashrafansari/ai_chatbot

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes
App README

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.css for a clean UI
  • โ€”๐Ÿณ Docker-ready for consistent environments
  • โ€”โ˜๏ธ Deployable on Hugging Face Spaces Hey, Cortana. ---

๐Ÿงฉ Tech Stack

TechnologyPurpose
FastAPIBackend API server
ChainlitFrontend interface for the chatbot
Google GeminiLanguage model (via API)
OpenAI SDKAgentic framework for orchestration
DockerContainerization
Hugging FaceApp hosting and deployment
uvPackage and environment management

โš™๏ธ Setup Instructions

1. Clone the Repository

bash
git clone https://github.com/arman229/ai_chatbot.git
cd ai_chatbot

2. Create a Virtual Environment

Using `uv`:

bash
uv venv
.venv\Scripts\activate
uv pip install pyproject.toml

3. Configure Environment

Create a .env file in the root directory:

env
GEMINI_API_KEY=your_gemini_api_key_here

4. Run Locally

Start FastAPI backend:
bash
uvicorn chatbot.main:app --reload

Access it at: http://localhost:8000


๐Ÿณ Docker Usage

Build the Image

bash
docker build -t ai_chatbot .

Run the Container

bash
docker run -p 8000:8000  ai_chatbot

๐Ÿš€ Deployment on Hugging Face

  1. 1.Create a new Space on Hugging Face.
  2. 2.Choose "Docker" as the runtime.
  3. 3.Connect your GitHub repo or manually upload your project.
  4. 4.Hugging Face will automatically build and deploy your app.