Update app.py
Browse files
app.py
CHANGED
|
@@ -67,7 +67,7 @@ def convert_files(files):
|
|
| 67 |
|
| 68 |
@spaces.GPU
|
| 69 |
def index_gpu(images, ds):
|
| 70 |
-
"""Example script to run inference with ColPali"""
|
| 71 |
|
| 72 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
| 73 |
if device != model.device:
|
|
@@ -91,9 +91,8 @@ def index_gpu(images, ds):
|
|
| 91 |
|
| 92 |
|
| 93 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 94 |
-
gr.Markdown("# ColPali: Efficient Document Retrieval with Vision Language Models 📚")
|
| 95 |
-
gr.Markdown("""Demo to test ColPali on PDF documents.
|
| 96 |
-
|
| 97 |
ColPali is model implemented from the [ColPali paper](https://arxiv.org/abs/2407.01449).
|
| 98 |
|
| 99 |
This demo allows you to upload PDF files and search for the most relevant pages based on your query.
|
|
|
|
| 67 |
|
| 68 |
@spaces.GPU
|
| 69 |
def index_gpu(images, ds):
|
| 70 |
+
"""Example script to run inference with ColPali (ColQwen2)"""
|
| 71 |
|
| 72 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
| 73 |
if device != model.device:
|
|
|
|
| 91 |
|
| 92 |
|
| 93 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 94 |
+
gr.Markdown("# ColPali: Efficient Document Retrieval with Vision Language Models (ColQwen2) 📚")
|
| 95 |
+
gr.Markdown("""Demo to test ColQwen2 (ColPali) on PDF documents.
|
|
|
|
| 96 |
ColPali is model implemented from the [ColPali paper](https://arxiv.org/abs/2407.01449).
|
| 97 |
|
| 98 |
This demo allows you to upload PDF files and search for the most relevant pages based on your query.
|