Ahmed007 commited on
Commit
4d81aab
1 Parent(s): 20a4635

Add application file

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -24,9 +24,9 @@ def analyze_image_direct(image, question):
24
  return answer
25
  # Create a Gradio interface
26
  with gr.Blocks() as block:
27
- image = gr.inputs.Image(label="Image")
28
- question = gr.inputs.Textbox(label="Question")
29
- output = gr.outputs.Textbox(label="Answer")
30
- gr.Interface(fn=analyze_image_direct, inputs=[image, question], outputs=output).launch()
31
 
32
- block.launch()
 
24
  return answer
25
  # Create a Gradio interface
26
  with gr.Blocks() as block:
27
+ image = gr.Image(label="Image")
28
+ question = gr.Textbox(label="Question")
29
+ output = gr.Textbox(label="Answer")
30
+ block.add(gr.Interface(fn=analyze_image_direct, inputs=[image, question], outputs=output))
31
 
32
+ block.launch()