Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -101,16 +101,15 @@ def get_example():
|
|
| 101 |
return [[["climate_youth_magazine.pdf"], "How much tropical forest is cut annually ?"]]
|
| 102 |
|
| 103 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 104 |
-
gr.Markdown("#
|
| 105 |
-
gr.Markdown("""Demo to test
|
| 106 |
|
| 107 |
-
|
| 108 |
|
| 109 |
This demo allows you to upload PDF files and search for the most relevant pages based on your query.
|
| 110 |
Refresh the page if you change documents !
|
| 111 |
|
| 112 |
-
β οΈ This
|
| 113 |
-
Other models will be released with better robustness towards different languages and document formats !
|
| 114 |
""")
|
| 115 |
with gr.Row():
|
| 116 |
with gr.Column(scale=2):
|
|
@@ -127,12 +126,6 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 127 |
query = gr.Textbox(placeholder="Enter your query here", label="Query")
|
| 128 |
k = gr.Slider(minimum=1, maximum=10, step=1, label="Number of results", value=5)
|
| 129 |
|
| 130 |
-
# with gr.Row():
|
| 131 |
-
# gr.Examples(
|
| 132 |
-
# examples=get_example(),
|
| 133 |
-
# inputs=[file, query],
|
| 134 |
-
# )
|
| 135 |
-
|
| 136 |
# Define the actions
|
| 137 |
search_button = gr.Button("π Search", variant="primary")
|
| 138 |
output_gallery = gr.Gallery(label="Retrieved Documents", height=600, show_label=True)
|
|
|
|
| 101 |
return [[["climate_youth_magazine.pdf"], "How much tropical forest is cut annually ?"]]
|
| 102 |
|
| 103 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 104 |
+
gr.Markdown("# ColFlor: Towards BERT-Size Vision-Language Document Retrieval Models")
|
| 105 |
+
gr.Markdown("""Demo to test ColFlor on PDF documents. This space is adapted from [ColPali Demo Space](https://huggingface.co/spaces/manu/ColPali-demo)
|
| 106 |
|
| 107 |
+
For more details about ColFlor, please refer to our blogpost (https://huggingface.co/blog/ahmed-masry/colflor).
|
| 108 |
|
| 109 |
This demo allows you to upload PDF files and search for the most relevant pages based on your query.
|
| 110 |
Refresh the page if you change documents !
|
| 111 |
|
| 112 |
+
β οΈ This model performs best on English documents, and does not generalize well to other languages.
|
|
|
|
| 113 |
""")
|
| 114 |
with gr.Row():
|
| 115 |
with gr.Column(scale=2):
|
|
|
|
| 126 |
query = gr.Textbox(placeholder="Enter your query here", label="Query")
|
| 127 |
k = gr.Slider(minimum=1, maximum=10, step=1, label="Number of results", value=5)
|
| 128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
# Define the actions
|
| 130 |
search_button = gr.Button("π Search", variant="primary")
|
| 131 |
output_gallery = gr.Gallery(label="Retrieved Documents", height=600, show_label=True)
|