ysharma HF Staff commited on
Commit
c11dc8a
·
1 Parent(s): e0ebe83
Files changed (1) hide show
  1. app.py +14 -14
app.py CHANGED
@@ -98,22 +98,22 @@ with demo:
98
  """Testing Inference for Gradio. Work in Progress."""
99
  )
100
  with gr.Row():
101
- #in_image = gr.Image(type='filepath') #(visible=False) type='numpy'
102
- #in_image_mask = gr.Image(type='filepath') #, source="canvas") #, visible=False) #type='numpy',
103
- #out_image = gr.outputs.Image(type='file') #(type='file')
104
 
105
  #in_text1 = gr.Textbox()
106
  #in_text2 = gr.Textbox()
107
  #out_text = gr.Textbox()
108
 
109
- #b1 = gr.Button("Image Button") -----
110
- #b2 = gr.Button("Text Button")
111
 
112
- #b1.click(get_lama,inputs=[in_image, in_image_mask], outputs=out_image) -----
113
- #b2.click(txt_fun, inputs=[in_text1, in_text2], outputs=out_text)
114
- #examples=examples
115
 
116
- #with gr.Row():
117
  in_image_ofa = gr.Image(type='filepath') #(visible=False) type='numpy'
118
  in_txt_ofa = gr.Textbox(value="Visual Grounding", visible=False)
119
  in_txt_ofa_ques = gr.Textbox(label="Who do you want to remove from your picture?")
@@ -123,9 +123,9 @@ with demo:
123
  #in_text2 = gr.Textbox()
124
  #out_text = gr.Textbox()
125
 
126
- b2 = gr.Button("Image Button OFA")
127
- #b2 = gr.Button("Text Button")
128
-
129
- b2.click(get_ofa,inputs=[in_image_ofa, in_txt_ofa, in_txt_ofa_ques], outputs=out_image_ofa)
130
-
131
  demo.launch(enable_queue=True, debug=True)
 
98
  """Testing Inference for Gradio. Work in Progress."""
99
  )
100
  with gr.Row():
101
+ in_image = gr.Image(type='filepath') #(visible=False) type='numpy'
102
+ in_image_mask = gr.Image(type='filepath') #, source="canvas") #, visible=False) #type='numpy',
103
+ out_image = gr.outputs.Image(type='file') #(type='file')
104
 
105
  #in_text1 = gr.Textbox()
106
  #in_text2 = gr.Textbox()
107
  #out_text = gr.Textbox()
108
 
109
+ b1 = gr.Button("Image Button")
110
+ #b2 = gr.Button("Text Button")
111
 
112
+ b1.click(get_lama,inputs=[in_image, in_image_mask], outputs=out_image)
113
+ #b2.click(txt_fun, inputs=[in_text1, in_text2], outputs=out_text)
114
+ #examples=examples
115
 
116
+ with gr.Row():
117
  in_image_ofa = gr.Image(type='filepath') #(visible=False) type='numpy'
118
  in_txt_ofa = gr.Textbox(value="Visual Grounding", visible=False)
119
  in_txt_ofa_ques = gr.Textbox(label="Who do you want to remove from your picture?")
 
123
  #in_text2 = gr.Textbox()
124
  #out_text = gr.Textbox()
125
 
126
+ b2 = gr.Button("Image Button OFA")
127
+ #b2 = gr.Button("Text Button")
128
+
129
+ b2.click(get_ofa,inputs=[in_image_ofa, in_txt_ofa, in_txt_ofa_ques], outputs=out_image_ofa)
130
+
131
  demo.launch(enable_queue=True, debug=True)