Skip to content

Commit 078010c

Browse files
authored
Merge pull request #12 from akashmadisetty/main
Changed the Gemini model to gemini-2.5-flash
2 parents ee79864 + e1608aa commit 078010c

File tree

4 files changed

+24
-8
lines changed

4 files changed

+24
-8
lines changed

demo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@
5959
# Initialize VLM
6060
gemini_api_key = os.getenv("GEMINI_API_KEY")
6161

62-
# Initialize LLM and VLM with Groq by default
62+
# Initialize LLM and VLM with LiteLLM by default
6363
if gemini_api_key:
64-
gemini_model = "gemini/gemini-2.5-flash-preview-04-17"
64+
gemini_model = "gemini/gemini-2.5-flash"
6565
gem_llm = LiteLLM(model=gemini_model, api_key=gemini_api_key, verbose=False)
6666
gem_vlm = LiteLLMVLM(model=gemini_model, api_key=gemini_api_key, verbose=False)
6767

6868
llm = gem_llm
6969
vlm = gem_vlm
70-
print(f"Using Groq with model: {gemini_model}")
70+
print(f"Using LiteLLM with model: {gemini_model}")
7171
else:
7272
# For backward compatibility, use the existing initialization
7373
vlm = OpenAI()

docs/demo.ipynb

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
},
3838
"outputs": [],
3939
"source": [
40-
"!git clone https://github.com/akashmadisetty/VARAG\n",
40+
"!git clone https://github.com/adithya-s-k/VARAG\n",
4141
"%cd VARAG\n",
4242
"%pwd"
4343
]
@@ -148,6 +148,7 @@
148148
},
149149
"outputs": [],
150150
"source": [
151+
"#This is the code to run the VARAG Demo without any Interpretability maps\n",
151152
"!python demo.py --share"
152153
]
153154
},
@@ -159,6 +160,21 @@
159160
"source": [
160161
"For exploring colpali interpretation check out codes in examples/inference_colpali"
161162
]
163+
},
164+
{
165+
"cell_type": "code",
166+
"execution_count": null,
167+
"metadata": {
168+
"id": "X6n3jqsV7aVG",
169+
"vscode": {
170+
"languageId": "plaintext"
171+
}
172+
},
173+
"outputs": [],
174+
"source": [
175+
"#Run this to load the Interpretability maps feature for colpali\n",
176+
"!python examples/inference_colpali/demo_with_heatmaps.py --share"
177+
]
162178
}
163179
],
164180
"metadata": {

examples/inference_colpali/demo_with_heatmaps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989

9090
# Initialize LLM and VLM with Groq by default
9191
if gemini_api_key:
92-
gemini_model = "gemini/gemini-2.5-flash-preview-04-17"
92+
gemini_model = "gemini/gemini-2.5-flash"
9393
gem_llm = LiteLLM(model=gemini_model, api_key=gemini_api_key, verbose=False)
9494
gem_vlm = LiteLLMVLM(model=gemini_model, api_key=gemini_api_key, verbose=False)
9595

examples/inference_colpali/modal_demo_heatmaps_comparing_colpali_models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
modal.Image.from_registry(f"nvidia/cuda:{tag}", add_python="3.11")
2626
.apt_install("git")
2727
.run_commands([
28-
"git clone https://github.com/akashmadisetty/VARAG",
28+
"git clone https://github.com/adithya-s-k/VARAG",
2929
"cd VARAG && pip install -e ."
3030
])
3131
.pip_install("colpali-engine[interpretability]")
@@ -53,7 +53,7 @@
5353
@app.function(
5454
image=inference_image,
5555
gpu="L4", # Use powerful GPU for unoptimized version
56-
timeout=7200, # 2 hour timeout
56+
timeout=3600, # 1 hour timeout
5757
volumes={
5858
VOLUME_PATH: col_vol,
5959
},
@@ -695,7 +695,7 @@ def compare_colpali_models(query, colpali_images):
695695

696696
# Generate aggregated comparison heatmaps for each image
697697
aggregated_comparison_images = []
698-
for i, image in enumerate(colpali_images[:3]): # Limit to first 3 images for aggregated view
698+
for i, image in enumerate(colpali_images[:10]): # Limit to first 3 images for aggregated view
699699
print(f"🔄 Generating aggregated heatmaps for image {i+1}...")
700700
comparison_result, base_meta, finetuned_meta = create_aggregated_comparison_heatmaps(
701701
base_generator, finetuned_generator, image, query

0 commit comments

Comments
 (0)