diegulio commited on
Commit
23662b6
·
1 Parent(s): 92eaba8
Files changed (1) hide show
  1. cedula/app.py +12 -1
cedula/app.py CHANGED
@@ -142,7 +142,18 @@ def get_attributes(input_img):
142
  #demo.launch()
143
 
144
  def create_model():
145
- demo = gr.Interface(get_attributes, "image", "label")
 
 
 
 
 
 
 
 
 
 
 
146
  return demo
147
 
148
 
 
142
  #demo.launch()
143
 
144
  def create_model():
145
+ with gr.Blocks() as demo:
146
+ with gr.Row():
147
+ with gr.Column():
148
+ input_image = gr.Image(source='upload', label='Input Image')
149
+ submit = gr.Button("Submit")
150
+ with gr.Column():
151
+ output_text = gr.Textbox(label='Output Text')
152
+
153
+ submit.click(fn=get_attributes,
154
+ inputs=input_image,
155
+ outputs=output_text)
156
+
157
  return demo
158
 
159