Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -24,7 +24,9 @@ uploaded = st.file_uploader("Choose audio file(s)", type=["mp3", "wav", "flac"],
|
|
24 |
if my_key and uploaded: # Proceed only if the API key is provided and files are uploaded
|
25 |
st.write("Processing your files...")
|
26 |
results = {}
|
27 |
-
for
|
|
|
|
|
28 |
# Save the file locally
|
29 |
with open(filename, "wb") as f:
|
30 |
f.write(file_data)
|
@@ -34,3 +36,6 @@ if my_key and uploaded: # Proceed only if the API key is provided and files are
|
|
34 |
|
35 |
# Store the result
|
36 |
results[filename] = output
|
|
|
|
|
|
|
|
24 |
if my_key and uploaded: # Proceed only if the API key is provided and files are uploaded
|
25 |
st.write("Processing your files...")
|
26 |
results = {}
|
27 |
+
for uploaded_file in uploaded.items():
|
28 |
+
filename = uploaded_file.name
|
29 |
+
file_data = uploaded_file.read()
|
30 |
# Save the file locally
|
31 |
with open(filename, "wb") as f:
|
32 |
f.write(file_data)
|
|
|
36 |
|
37 |
# Store the result
|
38 |
results[filename] = output
|
39 |
+
|
40 |
+
for file, result in results.items():
|
41 |
+
st.write(f"\nResults for {file}:\n{result}")
|