Spaces:
Runtime error
Runtime error
Update README
Browse files
README.md
CHANGED
@@ -7,4 +7,58 @@ app_file: main.py
|
|
7 |
sdk: gradio
|
8 |
sdk_version: 4.16.0
|
9 |
pinned: true
|
|
|
10 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
sdk: gradio
|
8 |
sdk_version: 4.16.0
|
9 |
pinned: true
|
10 |
+
license: mit
|
11 |
---
|
12 |
+
|
13 |
+
# Fitness Q&A
|
14 |
+
This project is a simple question-answering (Q&A) bot focused on fitness-related queries. It utilized a combination of machine learning models and retrieval techniques to provide informative responses to user questions.
|
15 |
+
|
16 |
+
Check out the chatbot here: https://huggingface.co/spaces/lstetson/Fitness_QA_Bot
|
17 |
+
|
18 |
+
The main objective is to assist users in obtaining relevant information about fitness and recovery topics. The bot accepts user questions as inputs and returns answers along with a link to Dr. Andrew Huberman's videos for further context. The videos come from his [Fitness and Recovery playlist](https://www.youtube.com/playlist?list=PLPNW_gerXa4O24l7ZHoJbMC2xOO7SpS7K).
|
19 |
+
|
20 |
+
## Usage
|
21 |
+
To run the project, you need to have Python installed on your system along with the required dependencies specified in ``requirements.txt``.
|
22 |
+
|
23 |
+
```bash
|
24 |
+
pip install -r requirements.txt
|
25 |
+
```
|
26 |
+
|
27 |
+
After installing the dependencies, you need to set up your OpenAI API Key. You can sign up for an API Key at [OpenAI's website](https://openai.com/). Once you have your API Key, you should set it as an environment variable named ``OPENAI_API_KEY``.
|
28 |
+
```bash
|
29 |
+
export OPENAI_API_KEY='your-api-key'
|
30 |
+
```
|
31 |
+
|
32 |
+
You can now run the `main.py` file. This will launch a Gradio interface where you can interact with the system.
|
33 |
+
|
34 |
+
## Data Extraction, Transformation, and Loading (ETL)
|
35 |
+
|
36 |
+
In addition to the main functionality provided by `main.py`, this project includes a script for Data Extraction, Transformation, and Loading (ETL). This script, `run_etl.py`, allows you to extract metadata (YouTube ids and video titles) from a JSON file, extract data, transform it, and load it into a database.
|
37 |
+
|
38 |
+
### Usage
|
39 |
+
|
40 |
+
To use the ETL script, follow these steps:
|
41 |
+
|
42 |
+
1. Navigate to the root directory of the project in your terminal.
|
43 |
+
2. Run the `run_etl.py` script using Python:
|
44 |
+
|
45 |
+
```bash
|
46 |
+
python run_etl.py
|
47 |
+
```
|
48 |
+
You will be prompted to provide the following information:
|
49 |
+
|
50 |
+
1. Path to the JSON file containing the data.
|
51 |
+
2. Path to the database where you want to store the transformed data.
|
52 |
+
3. Batch size for processing the data (leave blank for no batching).
|
53 |
+
4. Batch Overlap (leave blank for no overlap).
|
54 |
+
|
55 |
+
Here's an example:
|
56 |
+
|
57 |
+
Enter the path to the JSON file: **data/input_data.json**
|
58 |
+
Enter the path to the database: **data/output_database.db**
|
59 |
+
Enter batch size (leave blank for no batching): **10**
|
60 |
+
Enter overlap (leave blank for no overlap): **2**
|
61 |
+
|
62 |
+
## Acknowledgements
|
63 |
+
* Dr. Andrew Huberman - For his informative videos on health-related topics.
|
64 |
+
* [The Full Stack](https://github.com/the-full-stack/) - For inspiring this project and providing helpful resources.
|