janasumit2911 commited on
Commit
3d8ec31
1 Parent(s): 860f2af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -95,7 +95,7 @@ def process_audio(params):
95
  except json.JSONDecodeError as e:
96
  return {"error": f"Invalid JSON input: {e.msg} at line {e.lineno} column {e.colno}"}
97
 
98
- audio_files = params.get("audio_files", [])
99
  # api = params.get("api", "")
100
  # job_id = params.get("job_id", "")
101
 
@@ -120,7 +120,7 @@ def process_audio(params):
120
 
121
  import gradio as gr
122
 
123
- inputt = gr.Textbox(label="Parameters (JSON format) Eg. {'audio_files':['file1.mp3','file2.wav']}")
124
  outputs = gr.JSON()
125
 
126
  application = gr.Interface(fn=process_audio, inputs=inputt, outputs=outputs, title="Audio Classification with API Integration")
 
95
  except json.JSONDecodeError as e:
96
  return {"error": f"Invalid JSON input: {e.msg} at line {e.lineno} column {e.colno}"}
97
 
98
+ audio_files = params.get("urls", [])
99
  # api = params.get("api", "")
100
  # job_id = params.get("job_id", "")
101
 
 
120
 
121
  import gradio as gr
122
 
123
+ inputt = gr.Textbox(label="Parameters (JSON format) Eg. {'urls':['file1.mp3','file2.wav']}")
124
  outputs = gr.JSON()
125
 
126
  application = gr.Interface(fn=process_audio, inputs=inputt, outputs=outputs, title="Audio Classification with API Integration")