fabiochiu commited on
Commit
5a499dd
·
1 Parent(s): 45dba98

Update README

Browse files
Files changed (1) hide show
  1. README.md +23 -43
README.md CHANGED
@@ -1,59 +1,39 @@
1
- # Towards AI 🤖: An AI Question-Answering Bot
2
 
3
  ## Overview
4
 
5
- **Towards AI 🤖** is a question-answering bot designed to assist students with queries related to Artificial Intelligence (AI), Machine Learning (ML), and Deep Learning (DL). It leverages Large Language Models (LLMs) and Retrieval-Augmented Generation (RAG) techniques to provide insightful answers, utilizing a vector database for efficient retrieval of knowledge.
6
 
7
- ## Features
8
-
9
- - AI, ML, and DL question-answering capabilities.
10
- - Integration with ChromaDB for persistent storage.
11
- - Utilizes OpenAI's models for generating responses.
12
- - Gradio interface for easy interaction.
13
- - Memory management for maintaining conversation context.
14
-
15
- ## Requirements
16
 
17
- Make sure you have installed the dependencies from requirements.txt file.
18
 
19
  ```bash
20
- pip install -r requirements.txt
 
21
  ```
22
 
23
- ## Setup
24
-
25
- 1. **Clone the Repository**
26
-
27
- ```bash
28
- git clone https://huggingface.co/yourusername/towards-ai
29
- cd towards-ai
30
- ```
31
 
32
- 2. **Environment Variables**
33
-
34
- Create a .env file in the project root and set the following variables:
35
- ```bash
36
- OPENAI_API_KEY=
37
- LOGFIRE_TOKEN=
38
- COHERE_API_KEY=
39
- MONGODB_URI=
40
- DB_NAME=ai_tutor_knowledge
41
- ```
42
- 3. **Download the Vector Database**
43
-
44
- The bot requires a pre-trained vector database. If it doesn't exist locally, it will automatically download it from Hugging Face Hub when you run the code.
45
 
46
- 4. **Usage**
47
 
48
- To start the chatbot, run the following command:
49
- ```bash
50
- python app.py
51
- ```
52
 
53
- 5. **Gradio Interface**
54
 
55
- Once the application is running, you can access the chatbot interface at http://localhost:7860.
 
 
56
 
57
- 6. **Interacting with the Bot**
58
 
59
- You can ask the bot any question related to AI, ML, or DL. The bot is designed to provide clear, complete answers based on its knowledge base.
 
 
 
1
+ # Building and Deploying a Gradio UI on Hugging Face Spaces
2
 
3
  ## Overview
4
 
5
+ This repository contains the code of the "Building and Deploying a Gradio UI on Hugging Face Spaces" lesson of the "From Beginner to Advanced LLM Developer" course.
6
 
7
+ ## Setup
 
 
 
 
 
 
 
 
8
 
9
+ 1. Clone the repository.
10
 
11
  ```bash
12
+ git clone git@github.com:towardsai/ai-tutor-gradio-lesson.git
13
+ cd ai-tutor-gradio-lesson
14
  ```
15
 
16
+ 2. Create a `.env` file and add there your OpenAI API key. Its content should be something like:
 
 
 
 
 
 
 
17
 
18
+ ```bash
19
+ OPENAI_API_KEY="sk-..."
20
+ ```
 
 
 
 
 
 
 
 
 
 
21
 
22
+ 3. Create a local virtual environment, for example using the `venv` module. Then, activate it.
23
 
24
+ ```bash
25
+ python -m venv venv
26
+ source venv/bin/activate
27
+ ```
28
 
29
+ 4. Install the dependencies.
30
 
31
+ ```bash
32
+ pip install -r requirements.txt
33
+ ```
34
 
35
+ 5. Launch the Gradio app.
36
 
37
+ ```bash
38
+ python app.py
39
+ ```