Factor Studios commited on
Commit
824cf92
·
verified ·
1 Parent(s): f329390

Update test_ai_integration.py

Browse files
Files changed (1) hide show
  1. test_ai_integration.py +6 -6
test_ai_integration.py CHANGED
@@ -158,21 +158,21 @@ def test_ai_integration():
158
  })
159
 
160
  # Load BLIP-2 Large model directly to WebSocket storage
161
- from transformers import AutoModelForCausalLM, AutoProcessor
162
- model_id = "microsoft/florence-2-large"
163
  print(f"Loading model {model_id} directly to WebSocket storage...")
164
 
165
  try:
166
  # Load model and processor with proper error handling
167
- model = AutoModelForCausalLM.from_pretrained(
168
- model_id,
169
  trust_remote_code=True,
170
  device_map="auto", # Allow automatic device mapping
171
  torch_dtype="auto" # Use appropriate dtype
172
  )
173
 
174
- processor = AutoProcessor.from_pretrained(
175
- model_id,
176
  trust_remote_code=True
177
  )
178
 
 
158
  })
159
 
160
  # Load BLIP-2 Large model directly to WebSocket storage
161
+ from transformers import Blip2ForConditionalGeneration, Blip2Processor
162
+ model_id = "Salesforce/blip2-opt-2.7b"
163
  print(f"Loading model {model_id} directly to WebSocket storage...")
164
 
165
  try:
166
  # Load model and processor with proper error handling
167
+ model = Blip2ForConditionalGeneration.from_pretrained(
168
+ model_id,
169
  trust_remote_code=True,
170
  device_map="auto", # Allow automatic device mapping
171
  torch_dtype="auto" # Use appropriate dtype
172
  )
173
 
174
+ processor = Blip2Processor.from_pretrained(
175
+ model_id,
176
  trust_remote_code=True
177
  )
178