Spaces:
Running on Zero
Running on Zero
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -132,7 +132,7 @@ CSS = """
|
|
| 132 |
.dark .gradio-container { color: var(--body-text-color); }
|
| 133 |
"""
|
| 134 |
|
| 135 |
-
with gr.Blocks(
|
| 136 |
gr.Markdown(
|
| 137 |
"# 🔍 V-SPLADE Quality — Visual Document Retrieval\n"
|
| 138 |
"Upload a document page image and enter text queries to see the "
|
|
@@ -150,7 +150,7 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:
|
|
| 150 |
)
|
| 151 |
queries_input = gr.Textbox(
|
| 152 |
label="Queries (one per line)",
|
| 153 |
-
value="
|
| 154 |
lines=5,
|
| 155 |
placeholder="Enter one query per line…",
|
| 156 |
)
|
|
@@ -168,9 +168,9 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:
|
|
| 168 |
|
| 169 |
gr.Examples(
|
| 170 |
examples=[
|
| 171 |
-
["sample_page.png", "
|
| 172 |
-
["sample_page.png", "
|
| 173 |
-
["sample_page.png", "
|
| 174 |
],
|
| 175 |
inputs=[image_input, queries_input, topk_slider],
|
| 176 |
outputs=[tokens_output, scores_output, stats_output],
|
|
@@ -187,4 +187,4 @@ with gr.Blocks(theme=gr.themes.Citrus(), css=CSS) as demo:
|
|
| 187 |
)
|
| 188 |
|
| 189 |
if __name__ == "__main__":
|
| 190 |
-
demo.launch(mcp_server=True)
|
|
|
|
| 132 |
.dark .gradio-container { color: var(--body-text-color); }
|
| 133 |
"""
|
| 134 |
|
| 135 |
+
with gr.Blocks(css=CSS) as demo:
|
| 136 |
gr.Markdown(
|
| 137 |
"# 🔍 V-SPLADE Quality — Visual Document Retrieval\n"
|
| 138 |
"Upload a document page image and enter text queries to see the "
|
|
|
|
| 150 |
)
|
| 151 |
queries_input = gr.Textbox(
|
| 152 |
label="Queries (one per line)",
|
| 153 |
+
value="dog\nRecords\nBennett",
|
| 154 |
lines=5,
|
| 155 |
placeholder="Enter one query per line…",
|
| 156 |
)
|
|
|
|
| 168 |
|
| 169 |
gr.Examples(
|
| 170 |
examples=[
|
| 171 |
+
["sample_page.png", "dog\nRecords\nBennett", 15],
|
| 172 |
+
["sample_page.png", "dog breed\nveterinary\ntraining", 15],
|
| 173 |
+
["sample_page.png", "puppy\nchampionship\npedigree", 20],
|
| 174 |
],
|
| 175 |
inputs=[image_input, queries_input, topk_slider],
|
| 176 |
outputs=[tokens_output, scores_output, stats_output],
|
|
|
|
| 187 |
)
|
| 188 |
|
| 189 |
if __name__ == "__main__":
|
| 190 |
+
demo.launch(mcp_server=True, theme=gr.themes.Citrus())
|