An Arabic-language RAG (Retrieval-Augmented Generation) chatbot built with FastAPI, Streamlit, ChromaDB, and Google Gemini.
git clone https://github.com/Sami-Hached/Tanit-bot
cd Tanit-bot
uv sync
Create a .env file in the project root:
cp .env.example .env
Then open .env and fill in your API key:
GOOGLE_API_KEY=your_google_api_key_here
Place .txt files (UTF-8 encoded) in the data/ directory. These are the documents the RAG system will index and query against.
If a
chroma_db/directory already exists, the index will be loaded from disk and this step can be skipped.
You need two terminals — one for the backend API and one for the frontend.
uv run uvicorn main:app --reload
The API will be available at http://localhost:8000.
uv run streamlit run app.py
The UI will open automatically in your browser at http://localhost:8501.
.
├── app.py # Streamlit frontend
├── main.py # FastAPI app entry point
├── endpoints.py # API route definitions
├── rag.py # RAG pipeline (embeddings, ChromaDB, Gemini)
├── data/ # Source documents (.txt files)
├── chroma_db/ # Persisted vector index (auto-generated)
└── modal-code/ # Modal.com deployment scripts (optional)
An Arabic-language RAG (Retrieval-Augmented Generation) chatbot built with FastAPI, Streamlit, ChromaDB, and Google Gemini.
git clone https://github.com/Sami-Hached/Tanit-bot
cd Tanit-bot
uv sync
Create a .env file in the project root:
cp .env.example .env
Then open .env and fill in your API key:
GOOGLE_API_KEY=your_google_api_key_here
Place .txt files (UTF-8 encoded) in the data/ directory. These are the documents the RAG system will index and query against.
If a
chroma_db/directory already exists, the index will be loaded from disk and this step can be skipped.
You need two terminals — one for the backend API and one for the frontend.
uv run uvicorn main:app --reload
The API will be available at http://localhost:8000.
uv run streamlit run app.py
The UI will open automatically in your browser at http://localhost:8501.
.
├── app.py # Streamlit frontend
├── main.py # FastAPI app entry point
├── endpoints.py # API route definitions
├── rag.py # RAG pipeline (embeddings, ChromaDB, Gemini)
├── data/ # Source documents (.txt files)
├── chroma_db/ # Persisted vector index (auto-generated)
└── modal-code/ # Modal.com deployment scripts (optional)