Spaces:
Running
on
Zero
Running
on
Zero
AdrienB134
commited on
Commit
•
b43bc4b
1
Parent(s):
cee8a1f
Update app.py
Browse files
app.py
CHANGED
@@ -218,7 +218,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
218 |
img_chunk = gr.State(value=[])
|
219 |
|
220 |
with gr.Column(scale=3):
|
221 |
-
gr.Markdown("## 2️⃣ Search")
|
222 |
query = gr.Textbox(placeholder="Enter your query here", label="Query")
|
223 |
k = gr.Slider(minimum=1, maximum=10, step=1, label="Number of results", value=1)
|
224 |
search_button = gr.Button("🔍 Search", variant="primary")
|
@@ -236,6 +236,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
236 |
convert_button.click(index, inputs=[file, embeds], outputs=[message, embeds, imgs])
|
237 |
search_button.click(search, inputs=[query, embeds, imgs, k], outputs=[output_gallery])
|
238 |
|
|
|
239 |
answer_button = gr.Button("Answer", variant="primary")
|
240 |
output = gr.Markdown(label="Output")
|
241 |
answer_button.click(model_inference, inputs=[output_gallery, query], outputs=output)
|
|
|
218 |
img_chunk = gr.State(value=[])
|
219 |
|
220 |
with gr.Column(scale=3):
|
221 |
+
gr.Markdown("## 2️⃣ Search with ColPali")
|
222 |
query = gr.Textbox(placeholder="Enter your query here", label="Query")
|
223 |
k = gr.Slider(minimum=1, maximum=10, step=1, label="Number of results", value=1)
|
224 |
search_button = gr.Button("🔍 Search", variant="primary")
|
|
|
236 |
convert_button.click(index, inputs=[file, embeds], outputs=[message, embeds, imgs])
|
237 |
search_button.click(search, inputs=[query, embeds, imgs, k], outputs=[output_gallery])
|
238 |
|
239 |
+
gr.Markdown("## 3️⃣ Get your answer with Qwen2-VL")
|
240 |
answer_button = gr.Button("Answer", variant="primary")
|
241 |
output = gr.Markdown(label="Output")
|
242 |
answer_button.click(model_inference, inputs=[output_gallery, query], outputs=output)
|