Spaces:
Running
Running
ahmed-masry
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -38,9 +38,9 @@ def predict(image, input_prompt):
|
|
38 |
return sequence
|
39 |
|
40 |
|
41 |
-
image = gr.
|
42 |
-
input_prompt = gr.
|
43 |
-
model_output = gr.
|
44 |
examples = [["chart_example_1.png", "What is the lowest value in blue bar?"],
|
45 |
["chart_example_2.png", "Which country has highest secondary graduation rate in 2018?"]]
|
46 |
|
@@ -50,7 +50,6 @@ interface = gr.Interface(fn=predict,
|
|
50 |
outputs=model_output,
|
51 |
examples=examples,
|
52 |
title=title,
|
53 |
-
theme='gradio/soft'
|
54 |
-
enable_queue=True)
|
55 |
|
56 |
interface.launch()
|
|
|
38 |
return sequence
|
39 |
|
40 |
|
41 |
+
image = gr.components.Image(type="pil", label="Chart Image")
|
42 |
+
input_prompt = gr.components.Textbox(label="Question")
|
43 |
+
model_output = gr.components.Textbox(label="Model Output")
|
44 |
examples = [["chart_example_1.png", "What is the lowest value in blue bar?"],
|
45 |
["chart_example_2.png", "Which country has highest secondary graduation rate in 2018?"]]
|
46 |
|
|
|
50 |
outputs=model_output,
|
51 |
examples=examples,
|
52 |
title=title,
|
53 |
+
theme='gradio/soft')
|
|
|
54 |
|
55 |
interface.launch()
|