multimodalart HF Staff commited on
Commit
b09eef7
·
verified ·
1 Parent(s): 60416d9

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -132,7 +132,7 @@ CSS = """
132
  .dark .gradio-container { color: var(--body-text-color); }
133
  """
134
 
135
- with gr.Blocks(theme=gr.themes.Citrus(), 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,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="financial summary\nmarket share\ncarbon emissions",
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", "financial summary\nmarket share\ncarbon emissions", 15],
172
- ["sample_page.png", "annual revenue 2024\nboard of directors", 15],
173
- ["sample_page.png", "risk factors\nstrategic priorities", 20],
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())