Spaces:
Sleeping
Sleeping
Omar Solano
commited on
Commit
β’
eb6540f
1
Parent(s):
da1bd08
update readme
Browse files
README.md
CHANGED
@@ -9,52 +9,68 @@ app_file: scripts/main.py
|
|
9 |
pinned: false
|
10 |
---
|
11 |
|
12 |
-
This repository contains the notebooks for the RAG course in [notebooks](./notebooks).
|
13 |
|
14 |
-
|
15 |
|
16 |
-
|
17 |
|
18 |
-
|
|
|
|
|
19 |
|
20 |
### Installation (for Gradio UI)
|
21 |
|
22 |
1. **Create a new Python environment:**
|
23 |
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
This command creates a virtual environment named `.venv`.
|
29 |
|
30 |
2. **Activate the environment:**
|
31 |
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
|
38 |
3. **Install the dependencies:**
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
|
44 |
### Usage (for Gradio UI)
|
45 |
|
46 |
1. **Set environment variables:**
|
47 |
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
-
|
51 |
-
|
52 |
-
|
|
|
53 |
|
54 |
2. **Run the application:**
|
55 |
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
|
60 |
-
|
|
|
9 |
pinned: false
|
10 |
---
|
11 |
|
12 |
+
This repository contains the notebooks for the RAG (Retrieval-Augmented Generation) course in the [notebooks](./notebooks) directory.
|
13 |
|
14 |
+
### Gradio UI Chatbot
|
15 |
|
16 |
+
A Gradio UI for the chatbot is available in [scripts/main.py](./scripts/main.py).
|
17 |
|
18 |
+
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).
|
19 |
+
|
20 |
+
**Note:** A GitHub Action automatically deploys the Gradio demo when changes are pushed to the `scripts` folder.
|
21 |
|
22 |
### Installation (for Gradio UI)
|
23 |
|
24 |
1. **Create a new Python environment:**
|
25 |
|
26 |
+
```bash
|
27 |
+
python -m venv .venv
|
28 |
+
```
|
|
|
|
|
29 |
|
30 |
2. **Activate the environment:**
|
31 |
|
32 |
+
For macOS and Linux:
|
33 |
+
|
34 |
+
```bash
|
35 |
+
source .venv/bin/activate
|
36 |
+
```
|
37 |
+
|
38 |
+
For Windows:
|
39 |
|
40 |
+
```bash
|
41 |
+
.venv\Scripts\activate
|
42 |
+
```
|
43 |
|
44 |
3. **Install the dependencies:**
|
45 |
|
46 |
+
```bash
|
47 |
+
pip install -r requirements.txt
|
48 |
+
```
|
49 |
|
50 |
### Usage (for Gradio UI)
|
51 |
|
52 |
1. **Set environment variables:**
|
53 |
|
54 |
+
Before running the application, set up the required API keys:
|
55 |
+
|
56 |
+
For macOS and Linux:
|
57 |
+
|
58 |
+
```bash
|
59 |
+
export OPENAI_API_KEY=your_openai_api_key_here
|
60 |
+
export COHERE_API_KEY=your_cohere_api_key_here
|
61 |
+
```
|
62 |
+
|
63 |
+
For Windows:
|
64 |
|
65 |
+
```bash
|
66 |
+
set OPENAI_API_KEY=your_openai_api_key_here
|
67 |
+
set COHERE_API_KEY=your_cohere_api_key_here
|
68 |
+
```
|
69 |
|
70 |
2. **Run the application:**
|
71 |
|
72 |
+
```bash
|
73 |
+
python scripts/main.py
|
74 |
+
```
|
75 |
|
76 |
+
This command starts the Gradio interface for the AI Tutor chatbot.
|