Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,4 @@
|
|
1 |
import os
|
2 |
-
# Install necessary libraries
|
3 |
-
os.system('pip install streamlit torch onnxruntime transformers sentencepiece pydub soxr edge-tts requests beautifulsoup4')
|
4 |
-
|
5 |
import streamlit as st
|
6 |
import torch
|
7 |
import sentencepiece as spm
|
@@ -162,14 +159,3 @@ if audio_file:
|
|
162 |
f.write(audio_file.getbuffer())
|
163 |
response_audio = await respond(audio_path, web_search)
|
164 |
st.audio(response_audio)
|
165 |
-
```
|
166 |
-
|
167 |
-
### Explanation:
|
168 |
-
1. **Library Installation**: Uses `os.system()` to install the required libraries at the beginning of the script.
|
169 |
-
2. **Streamlit Application**: The rest of the script remains the same as previously explained, including the Streamlit UI and the functionalities.
|
170 |
-
|
171 |
-
### How to Run:
|
172 |
-
Save this script as `app.py` and run it using the following command:
|
173 |
-
|
174 |
-
```bash
|
175 |
-
streamlit run app.py
|
|
|
1 |
import os
|
|
|
|
|
|
|
2 |
import streamlit as st
|
3 |
import torch
|
4 |
import sentencepiece as spm
|
|
|
159 |
f.write(audio_file.getbuffer())
|
160 |
response_audio = await respond(audio_path, web_search)
|
161 |
st.audio(response_audio)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|