Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,6 +30,14 @@ audio_file_options = [f for f in audio_files if f.endswith(('.mp3', '.wav'))]
|
|
| 30 |
# Dropdown to select an audio file
|
| 31 |
selected_file = st.selectbox("Select an audio file:", audio_file_options)
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
# Button to classify the selected audio file
|
| 34 |
if st.button("Classify"):
|
| 35 |
# Get the full path of the selected audio file
|
|
@@ -44,9 +52,4 @@ if st.button("Classify"):
|
|
| 44 |
for result in results:
|
| 45 |
st.write(f"Label: {result['label']}, Confidence: {result['score']:.2f}")
|
| 46 |
|
| 47 |
-
import transformers
|
| 48 |
-
import tensorflow as tf
|
| 49 |
|
| 50 |
-
st.write(f"Streamlit version: {st.__version__}")
|
| 51 |
-
st.write(f"Transformers version: {transformers.__version__}")
|
| 52 |
-
st.write(f"TensorFlow version: {tf.__version__}")
|
|
|
|
| 30 |
# Dropdown to select an audio file
|
| 31 |
selected_file = st.selectbox("Select an audio file:", audio_file_options)
|
| 32 |
|
| 33 |
+
import transformers
|
| 34 |
+
import tensorflow as tf
|
| 35 |
+
|
| 36 |
+
st.write(f"Streamlit version: {st.__version__}")
|
| 37 |
+
st.write(f"Transformers version: {transformers.__version__}")
|
| 38 |
+
st.write(f"TensorFlow version: {tf.__version__}")
|
| 39 |
+
|
| 40 |
+
|
| 41 |
# Button to classify the selected audio file
|
| 42 |
if st.button("Classify"):
|
| 43 |
# Get the full path of the selected audio file
|
|
|
|
| 52 |
for result in results:
|
| 53 |
st.write(f"Label: {result['label']}, Confidence: {result['score']:.2f}")
|
| 54 |
|
|
|
|
|
|
|
| 55 |
|
|
|
|
|
|
|
|
|