aahmed10202 commited on
Commit
0048de5
·
verified ·
1 Parent(s): 3b62f6e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
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 filename, file_data in uploaded.items():
 
 
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}")