Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -61,8 +61,19 @@ iface_2 = gradio.Interface(fn=predict,
|
|
| 61 |
description=description_2
|
| 62 |
)
|
| 63 |
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
| 65 |
|
| 66 |
-
|
|
|
|
|
|
|
|
|
|
| 67 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
#iface.launch(debug = True)#, server_name = "0.0.0.0", server_port = 8001) # Ref. for parameters: https://www.gradio.app/docs/interface
|
|
|
|
| 61 |
description=description_2
|
| 62 |
)
|
| 63 |
|
| 64 |
+
def combined_interface(input1, input2):
|
| 65 |
+
# Call individual model interfaces and combine results
|
| 66 |
+
model1_output = iface_1(input1)
|
| 67 |
+
model2_output = iface_2(input2)
|
| 68 |
|
| 69 |
+
combined_output = {
|
| 70 |
+
"model1_output": model1_output,
|
| 71 |
+
"model2_output": model2_output
|
| 72 |
+
}
|
| 73 |
|
| 74 |
+
return combined_output
|
| 75 |
+
|
| 76 |
+
parent_interface = gr.Interface(fn=combined_interface, inputs=["text","text"], outputs=["model1_output", "model2_output"])
|
| 77 |
+
|
| 78 |
+
parent_interface
|
| 79 |
#iface.launch(debug = True)#, server_name = "0.0.0.0", server_port = 8001) # Ref. for parameters: https://www.gradio.app/docs/interface
|