KarthiEz commited on
Commit
5087f0e
·
verified ·
1 Parent(s): 5f7a717

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -33,12 +33,13 @@ except Exception:
33
 
34
  # ---- Bootstrap pipeline (CPU only) ----
35
  pipe = pipeline(
36
- task="image-text-to-text",
37
- model=MODEL_ID,
38
- device=DEVICE, # <- forces CPU
39
- dtype=DTYPE, # <- CPU dtype
40
  trust_remote_code=True,
41
- use_fast=True, # if supported by the model’s processor
 
 
 
42
  )
43
 
44
  def _extract_text(obj):
 
33
 
34
  # ---- Bootstrap pipeline (CPU only) ----
35
  pipe = pipeline(
36
+ "image-text-to-text",
37
+ model="vikhyatk/moondream2",
 
 
38
  trust_remote_code=True,
39
+ revision="6b714b26eea5cbd9f31e4edb2541c170afa935ba", # pin to a known commit
40
+ device="cpu",
41
+ dtype=torch.float32,
42
+ use_fast=True,
43
  )
44
 
45
  def _extract_text(obj):