Spaces:
Sleeping
Sleeping
Initial commit with FastAPI + Gradio app
Browse files
app.py
CHANGED
@@ -83,8 +83,8 @@ def gradio_interface():
|
|
83 |
return gr.Interface(
|
84 |
fn=compare_voices,
|
85 |
inputs=[
|
86 |
-
gr.Audio(type="
|
87 |
-
gr.Audio(type="
|
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="
|
98 |
-
gr.Audio(type="
|
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
|