runaksh commited on
Commit
a386f8b
·
1 Parent(s): 5d6a670

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -2
app.py CHANGED
@@ -61,8 +61,19 @@ iface_2 = gradio.Interface(fn=predict,
61
  description=description_2
62
  )
63
 
64
- iface_1.launch(debug = True)
 
 
 
65
 
66
- iface_2.launch(debug = True)
 
 
 
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