Spaces:
Running
Running
Initial commit with FastAPI + Gradio app
Browse files
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="
|
68 |
-
gr.Audio(type="
|
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="
|
79 |
-
gr.Audio(type="
|
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
|