Nusri7 commited on
Commit
acbe8cd
·
1 Parent(s): ee0b049

Initial commit with FastAPI + Gradio app

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -83,8 +83,8 @@ def gradio_interface():
83
  return gr.Interface(
84
  fn=compare_voices,
85
  inputs=[
86
- gr.Audio(type="file", label="First Audio File"), # Updated to use `type="file"`
87
- gr.Audio(type="file", label="Second Audio File") # Updated to use `type="file"`
88
  ],
89
  outputs="json", # Output results as JSON
90
  live=False # No live interface, just the API
@@ -94,8 +94,8 @@ def gradio_interface():
94
  @app.on_event("startup")
95
  async def startup():
96
  gr.Interface(fn=compare_voices, inputs=[
97
- gr.Audio(type="file", label="First Audio File"), # Updated to use `type="file"`
98
- gr.Audio(type="file", label="Second Audio File") # Updated to use `type="file"`
99
  ], outputs="json", live=False).launch(share=True, inline=True)
100
 
101
  # Running the FastAPI app with Gradio
 
83
  return gr.Interface(
84
  fn=compare_voices,
85
  inputs=[
86
+ gr.Audio(type="numpy", label="First Audio File"), # Updated to use `type="numpy"`
87
+ gr.Audio(type="numpy", label="Second Audio File") # Updated to use `type="numpy"`
88
  ],
89
  outputs="json", # Output results as JSON
90
  live=False # No live interface, just the API
 
94
  @app.on_event("startup")
95
  async def startup():
96
  gr.Interface(fn=compare_voices, inputs=[
97
+ gr.Audio(type="numpy", label="First Audio File"), # Updated to use `type="numpy"`
98
+ gr.Audio(type="numpy", label="Second Audio File") # Updated to use `type="numpy"`
99
  ], outputs="json", live=False).launch(share=True, inline=True)
100
 
101
  # Running the FastAPI app with Gradio