zting commited on
Commit
f7680bc
1 Parent(s): 4fbc7de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -73,10 +73,13 @@ def segment(image):
73
 
74
  return agent(f"Describe the following image:\n{image_url}").get('output').replace('The response to your last comment is','')
75
 
76
- demo = gr.Interface(segment, gr.Image(type="filepath",shape=(200, 200)), "text")
 
 
 
 
 
 
 
77
  demo.launch()
78
 
79
- def greet(name):
80
- return "Hello " + name + "!"
81
-
82
- demo = gr.Interface(fn=greet, inputs="text", outputs="text")
 
73
 
74
  return agent(f"Describe the following image:\n{image_url}").get('output').replace('The response to your last comment is','')
75
 
76
+ demo = gr.Interface(
77
+ segment,
78
+ inputs=[
79
+ gr.Image(type="filepath",shape=(200, 200)),
80
+ gr.components.Textbox(label="Text"),
81
+ ],
82
+
83
+ "text")
84
  demo.launch()
85