Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ def get_caption(image_in):
|
|
8 |
|
9 |
fuyu_result = fuyu_client.predict(
|
10 |
image_in, # str representing input in 'raw_image' Image component
|
11 |
-
|
12 |
fn_index=2
|
13 |
)
|
14 |
print(f"IMAGE CAPTION: {fuyu_result}")
|
@@ -77,17 +77,17 @@ with gr.Blocks(css=css) as demo:
|
|
77 |
<h2 style="text-align: center;">LLM Agent from a Picture</h2>
|
78 |
<p style="text-align: center;">{description}</p>
|
79 |
""")
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
|
92 |
submit_btn.click(
|
93 |
fn = infer,
|
|
|
8 |
|
9 |
fuyu_result = fuyu_client.predict(
|
10 |
image_in, # str representing input in 'raw_image' Image component
|
11 |
+
True, # bool in 'Enable detailed captioning' Checkbox component
|
12 |
fn_index=2
|
13 |
)
|
14 |
print(f"IMAGE CAPTION: {fuyu_result}")
|
|
|
77 |
<h2 style="text-align: center;">LLM Agent from a Picture</h2>
|
78 |
<p style="text-align: center;">{description}</p>
|
79 |
""")
|
80 |
+
with gr.Row():
|
81 |
+
with gr.Column():
|
82 |
+
image_in = gr.Image(
|
83 |
+
label = "Image reference",
|
84 |
+
type = "filepath"
|
85 |
+
)
|
86 |
+
submit_btn = gr.Button("Make LLM system from my pic !")
|
87 |
+
with gr.Column():
|
88 |
+
result = gr.Textbox(
|
89 |
+
label ="Suggested System"
|
90 |
+
)
|
91 |
|
92 |
submit_btn.click(
|
93 |
fn = infer,
|