Spaces:
Sleeping
Sleeping
File size: 1,591 Bytes
7cdf34d 872ce15 7cdf34d 187d389 5a84661 7cdf34d 872ce15 eb6540f 30e4265 eb6540f ac6677d eb6540f ac6677d eb6540f 30e4265 872ce15 eb6540f 872ce15 eb6540f 872ce15 eb6540f 872ce15 eb6540f 872ce15 30e4265 872ce15 eb6540f 872ce15 eb6540f 872ce15 eb6540f 872ce15 eb6540f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
---
title: AI Tutor Chatbot
emoji: π§π»βπ«
colorFrom: gray
colorTo: pink
sdk: gradio
sdk_version: 4.39.0
app_file: scripts/main.py
pinned: false
---
This repository contains the notebooks for the RAG (Retrieval-Augmented Generation) course in the [notebooks](./notebooks) directory.
### Gradio UI Chatbot
A Gradio UI for the chatbot is available in [scripts/main.py](./scripts/main.py).
The Gradio demo is deployed on Hugging Face Spaces at: [AI Tutor Chatbot on Hugging Face](https://huggingface.co/spaces/towardsai-buster/ai-tutor-chatbot).
**Note:** A GitHub Action automatically deploys the Gradio demo when changes are pushed to the `scripts` folder.
### Installation (for Gradio UI)
1. **Create a new Python environment:**
```bash
python -m venv .venv
```
2. **Activate the environment:**
For macOS and Linux:
```bash
source .venv/bin/activate
```
For Windows:
```bash
.venv\Scripts\activate
```
3. **Install the dependencies:**
```bash
pip install -r requirements.txt
```
### Usage (for Gradio UI)
1. **Set environment variables:**
Before running the application, set up the required API keys:
For macOS and Linux:
```bash
export OPENAI_API_KEY=your_openai_api_key_here
export COHERE_API_KEY=your_cohere_api_key_here
```
For Windows:
```bash
set OPENAI_API_KEY=your_openai_api_key_here
set COHERE_API_KEY=your_cohere_api_key_here
```
2. **Run the application:**
```bash
python scripts/main.py
```
This command starts the Gradio interface for the AI Tutor chatbot.
|