acecalisto3 commited on
Commit
a5aeaec
·
verified ·
1 Parent(s): 758c7d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -24,6 +24,9 @@ import faiss
24
  import numpy as np
25
  from PIL import Image
26
 
 
 
 
27
  # Configure logging
28
  logging.basicConfig(
29
  level=logging.INFO,
@@ -200,9 +203,11 @@ class ModelManager:
200
  "image_processor": {
201
  "model_id": "Salesforce/blip-image-captioning-base",
202
  "processor": AutoProcessor,
203
- "model": AutoModel,
204
  "kwargs": {
205
- "cache_dir": str(cache_dir)
 
 
206
  }
207
  }
208
  }
 
24
  import numpy as np
25
  from PIL import Image
26
 
27
+
28
+
29
+
30
  # Configure logging
31
  logging.basicConfig(
32
  level=logging.INFO,
 
203
  "image_processor": {
204
  "model_id": "Salesforce/blip-image-captioning-base",
205
  "processor": AutoProcessor,
206
+ "model": BlipForConditionalGeneration, # Changed from AutoModel
207
  "kwargs": {
208
+ "cache_dir": str(cache_dir),
209
+ "device_map": "auto" # Add device mapping
210
+ }
211
  }
212
  }
213
  }