Spaces:
Build error
Build error
Update README.md
Browse files
README.md
CHANGED
@@ -1,89 +1,88 @@
|
|
1 |
-
---
|
2 |
-
title: AI Tutor Chatbot
|
3 |
-
emoji: π§π»βπ«
|
4 |
-
colorFrom: gray
|
5 |
-
colorTo: pink
|
6 |
-
sdk: gradio
|
7 |
-
sdk_version: 5.
|
8 |
-
app_file: scripts/main.py
|
9 |
-
pinned: false
|
10 |
-
---
|
11 |
-
### Gradio UI Chatbot
|
12 |
-
|
13 |
-
A Gradio UI for the chatbot is available in [scripts/main.py](./scripts/main.py).
|
14 |
-
|
15 |
-
The Gradio demo is deployed on Hugging Face Spaces at: [AI Tutor Chatbot on Hugging Face](https://huggingface.co/spaces/towardsai-tutors/ai-tutor-chatbot).
|
16 |
-
|
17 |
-
**Note:** A GitHub Action automatically deploys the Gradio demo when changes are pushed to the main branch (excluding documentation and scripts in the `data/scraping_scripts` directory).
|
18 |
-
|
19 |
-
### Installation (for Gradio UI)
|
20 |
-
|
21 |
-
1. **Create a new Python environment:**
|
22 |
-
|
23 |
-
```bash
|
24 |
-
python -m venv .venv
|
25 |
-
```
|
26 |
-
|
27 |
-
2. **Activate the environment:**
|
28 |
-
|
29 |
-
For macOS and Linux:
|
30 |
-
|
31 |
-
```bash
|
32 |
-
source .venv/bin/activate
|
33 |
-
```
|
34 |
-
|
35 |
-
For Windows:
|
36 |
-
|
37 |
-
```bash
|
38 |
-
.venv\Scripts\activate
|
39 |
-
```
|
40 |
-
|
41 |
-
3. **Install the dependencies:**
|
42 |
-
|
43 |
-
```bash
|
44 |
-
pip install -r requirements.txt
|
45 |
-
```
|
46 |
-
|
47 |
-
### Usage (for Gradio UI)
|
48 |
-
|
49 |
-
1. **Set environment variables:**
|
50 |
-
|
51 |
-
Before running the application, set up the required API keys:
|
52 |
-
|
53 |
-
For macOS and Linux:
|
54 |
-
|
55 |
-
```bash
|
56 |
-
export OPENAI_API_KEY=your_openai_api_key_here
|
57 |
-
export COHERE_API_KEY=your_cohere_api_key_here
|
58 |
-
```
|
59 |
-
|
60 |
-
For Windows:
|
61 |
-
|
62 |
-
```bash
|
63 |
-
set OPENAI_API_KEY=your_openai_api_key_here
|
64 |
-
set COHERE_API_KEY=your_cohere_api_key_here
|
65 |
-
```
|
66 |
-
|
67 |
-
2. **Run the application:**
|
68 |
-
|
69 |
-
```bash
|
70 |
-
python scripts/main.py
|
71 |
-
```
|
72 |
-
|
73 |
-
This command starts the Gradio interface for the AI Tutor chatbot.
|
74 |
-
|
75 |
-
### Updating Data Sources
|
76 |
-
|
77 |
-
This application uses a RAG (Retrieval Augmented Generation) system with multiple data sources, including documentation and courses. To update these sources:
|
78 |
-
|
79 |
-
1. **For adding new courses or updating documentation:**
|
80 |
-
- See the detailed instructions in [data/scraping_scripts/README.md](./data/scraping_scripts/README.md)
|
81 |
-
- Automated workflows are available for both course addition and documentation updates
|
82 |
-
|
83 |
-
2. **Available workflows:**
|
84 |
-
- `add_course_workflow.py` - For adding new course content
|
85 |
-
- `update_docs_workflow.py` - For updating documentation from GitHub repositories
|
86 |
-
- `upload_data_to_hf.py` - For uploading data files to HuggingFace
|
87 |
-
|
88 |
-
These scripts streamline the process of adding new content to the AI Tutor and ensure consistency across team members.
|
89 |
-
|
|
|
1 |
+
---
|
2 |
+
title: AI Tutor Chatbot
|
3 |
+
emoji: π§π»βπ«
|
4 |
+
colorFrom: gray
|
5 |
+
colorTo: pink
|
6 |
+
sdk: gradio
|
7 |
+
sdk_version: 5.39.0
|
8 |
+
app_file: scripts/main.py
|
9 |
+
pinned: false
|
10 |
+
---
|
11 |
+
### Gradio UI Chatbot
|
12 |
+
|
13 |
+
A Gradio UI for the chatbot is available in [scripts/main.py](./scripts/main.py).
|
14 |
+
|
15 |
+
The Gradio demo is deployed on Hugging Face Spaces at: [AI Tutor Chatbot on Hugging Face](https://huggingface.co/spaces/towardsai-tutors/ai-tutor-chatbot).
|
16 |
+
|
17 |
+
**Note:** A GitHub Action automatically deploys the Gradio demo when changes are pushed to the main branch (excluding documentation and scripts in the `data/scraping_scripts` directory).
|
18 |
+
|
19 |
+
### Installation (for Gradio UI)
|
20 |
+
|
21 |
+
1. **Create a new Python environment:**
|
22 |
+
|
23 |
+
```bash
|
24 |
+
python -m venv .venv
|
25 |
+
```
|
26 |
+
|
27 |
+
2. **Activate the environment:**
|
28 |
+
|
29 |
+
For macOS and Linux:
|
30 |
+
|
31 |
+
```bash
|
32 |
+
source .venv/bin/activate
|
33 |
+
```
|
34 |
+
|
35 |
+
For Windows:
|
36 |
+
|
37 |
+
```bash
|
38 |
+
.venv\Scripts\activate
|
39 |
+
```
|
40 |
+
|
41 |
+
3. **Install the dependencies:**
|
42 |
+
|
43 |
+
```bash
|
44 |
+
pip install -r requirements.txt
|
45 |
+
```
|
46 |
+
|
47 |
+
### Usage (for Gradio UI)
|
48 |
+
|
49 |
+
1. **Set environment variables:**
|
50 |
+
|
51 |
+
Before running the application, set up the required API keys:
|
52 |
+
|
53 |
+
For macOS and Linux:
|
54 |
+
|
55 |
+
```bash
|
56 |
+
export OPENAI_API_KEY=your_openai_api_key_here
|
57 |
+
export COHERE_API_KEY=your_cohere_api_key_here
|
58 |
+
```
|
59 |
+
|
60 |
+
For Windows:
|
61 |
+
|
62 |
+
```bash
|
63 |
+
set OPENAI_API_KEY=your_openai_api_key_here
|
64 |
+
set COHERE_API_KEY=your_cohere_api_key_here
|
65 |
+
```
|
66 |
+
|
67 |
+
2. **Run the application:**
|
68 |
+
|
69 |
+
```bash
|
70 |
+
python scripts/main.py
|
71 |
+
```
|
72 |
+
|
73 |
+
This command starts the Gradio interface for the AI Tutor chatbot.
|
74 |
+
|
75 |
+
### Updating Data Sources
|
76 |
+
|
77 |
+
This application uses a RAG (Retrieval Augmented Generation) system with multiple data sources, including documentation and courses. To update these sources:
|
78 |
+
|
79 |
+
1. **For adding new courses or updating documentation:**
|
80 |
+
- See the detailed instructions in [data/scraping_scripts/README.md](./data/scraping_scripts/README.md)
|
81 |
+
- Automated workflows are available for both course addition and documentation updates
|
82 |
+
|
83 |
+
2. **Available workflows:**
|
84 |
+
- `add_course_workflow.py` - For adding new course content
|
85 |
+
- `update_docs_workflow.py` - For updating documentation from GitHub repositories
|
86 |
+
- `upload_data_to_hf.py` - For uploading data files to HuggingFace
|
87 |
+
|
88 |
+
These scripts streamline the process of adding new content to the AI Tutor and ensure consistency across team members.
|
|