Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
---
|
| 2 |
title: Pavi
|
| 3 |
emoji: π
|
|
@@ -9,4 +10,37 @@ app_file: app.py
|
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
---
|
| 3 |
title: Pavi
|
| 4 |
emoji: π
|
|
|
|
| 10 |
pinned: false
|
| 11 |
---
|
| 12 |
|
| 13 |
+
# Pavi π
|
| 14 |
+
|
| 15 |
+
This is a Streamlit app that provides analytics and data visualization features. To ensure the app works correctly, especially when using audio-related libraries like `sounddevice`, some system dependencies need to be installed on Hugging Face Spaces.
|
| 16 |
+
|
| 17 |
+
## How Dependencies Are Managed on Hugging Face Spaces
|
| 18 |
+
|
| 19 |
+
1. **Python Dependencies**: Use a `requirements.txt` file to list all Python packages required for the app.
|
| 20 |
+
|
| 21 |
+
For example, the `requirements.txt` should include:
|
| 22 |
+
|
| 23 |
+
```txt
|
| 24 |
+
streamlit==1.41.1
|
| 25 |
+
sounddevice
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
2. **System Dependencies**: Hugging Face Spaces allows the use of an `apt.txt` file to install system-level packages. To ensure PortAudio and other necessary libraries are installed, add them to `apt.txt`.
|
| 29 |
+
|
| 30 |
+
Example `apt.txt` content:
|
| 31 |
+
|
| 32 |
+
```txt
|
| 33 |
+
portaudio19-dev
|
| 34 |
+
libasound-dev
|
| 35 |
+
libportaudio2
|
| 36 |
+
libportaudiocpp0
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
## How to Run the App
|
| 40 |
+
|
| 41 |
+
Once the dependencies are set up, Hugging Face Spaces will automatically install everything when deploying the app. You can run the app locally or view it on the deployed Hugging Face Spaces URL.
|
| 42 |
+
|
| 43 |
+
To run the app locally:
|
| 44 |
+
|
| 45 |
+
```bash
|
| 46 |
+
streamlit run app.py
|