Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,12 @@ from IPython.display import Audio
|
|
| 9 |
import os
|
| 10 |
import accelerate
|
| 11 |
|
| 12 |
-
os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python" #fix Spaces pipeline error
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
# load song
|
| 15 |
output_file = "/content/"
|
|
@@ -74,8 +79,6 @@ def main():
|
|
| 74 |
st.write("File uploaded successfully!")
|
| 75 |
else:
|
| 76 |
st.write("No file uploaded.")
|
| 77 |
-
st.set_page_config(page_title="Sentiment Analysis on Your Cantonese Song",)
|
| 78 |
-
st.header("Cantonese Song Sentiment Analyzer")
|
| 79 |
audio_preprocess()
|
| 80 |
transcription = asr_model()
|
| 81 |
final_result = senti_model(transcription)
|
|
|
|
| 9 |
import os
|
| 10 |
import accelerate
|
| 11 |
|
| 12 |
+
#os.environ["PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION"] = "python" #fix Spaces pipeline error
|
| 13 |
+
|
| 14 |
+
# steamlit setup
|
| 15 |
+
st.set_page_config(page_title="Sentiment Analysis on Your Cantonese Song",)
|
| 16 |
+
st.header("Cantonese Song Sentiment Analyzer")
|
| 17 |
+
|
| 18 |
|
| 19 |
# load song
|
| 20 |
output_file = "/content/"
|
|
|
|
| 79 |
st.write("File uploaded successfully!")
|
| 80 |
else:
|
| 81 |
st.write("No file uploaded.")
|
|
|
|
|
|
|
| 82 |
audio_preprocess()
|
| 83 |
transcription = asr_model()
|
| 84 |
final_result = senti_model(transcription)
|