Nusri7 commited on
Commit
1cd14c6
·
1 Parent(s): 1aa4ade

Initial commit with FastAPI + Gradio app

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -64,8 +64,8 @@ def gradio_interface():
64
  return gr.Interface(
65
  fn=compare_voices_api, # FastAPI function is wrapped here
66
  inputs=[
67
- gr.Audio(type="filepath", label="First Audio File"), # Corrected type to 'filepath'
68
- gr.Audio(type="filepath", label="Second Audio File") # Corrected type to 'filepath'
69
  ],
70
  outputs="json", # Output as JSON
71
  live=False # No live interface, just the API
@@ -75,8 +75,8 @@ def gradio_interface():
75
  @app.on_event("startup")
76
  async def startup():
77
  gr.Interface(fn=compare_voices_api, inputs=[
78
- gr.Audio(type="filepath", label="First Audio File"), # Corrected type to 'filepath'
79
- gr.Audio(type="filepath", label="Second Audio File") # Corrected type to 'filepath'
80
  ], outputs="json", live=False).launch(share=True, inline=True)
81
 
82
  # Running the FastAPI app with Gradio
 
64
  return gr.Interface(
65
  fn=compare_voices_api, # FastAPI function is wrapped here
66
  inputs=[
67
+ gr.Audio(type="file", label="First Audio File"), # Audio file input
68
+ gr.Audio(type="file", label="Second Audio File") # Audio file input
69
  ],
70
  outputs="json", # Output as JSON
71
  live=False # No live interface, just the API
 
75
  @app.on_event("startup")
76
  async def startup():
77
  gr.Interface(fn=compare_voices_api, inputs=[
78
+ gr.Audio(type="file", label="First Audio File"), # Audio file input
79
+ gr.Audio(type="file", label="Second Audio File") # Audio file input
80
  ], outputs="json", live=False).launch(share=True, inline=True)
81
 
82
  # Running the FastAPI app with Gradio