uttarasawant commited on
Commit
2e84422
·
verified ·
1 Parent(s): fa1def1

Update app.py to avoid using specific VLM model version

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -40,11 +40,18 @@ def save_state_to_disk(dataframe_rows):
40
  except Exception as e:
41
  print(f"⚠️ Critical storage write failure: {e}")
42
 
 
 
 
43
  print("🤖 Initializing Edge-native Vision-Telemetry Model...")
44
  model_id = "vikhyatk/moondream2"
45
- revision = "2024-05-20" # Use a stable release
46
- model = AutoModelForCausalLM.from_pretrained(model_id, revision=revision, trust_remote_code=True)
47
- tokenizer = AutoTokenizer.from_pretrained(model_id, revision=revision)
 
 
 
 
48
 
49
  def process_kitchen_operations(input_image, budget, days):
50
  if input_image is None:
 
40
  except Exception as e:
41
  print(f"⚠️ Critical storage write failure: {e}")
42
 
43
+ # =====================================================================
44
+ # 🤖 FIXED COMPACT VISION-LANGUAGE INFRASTRUCTURE (CPU Optimized)
45
+ # =====================================================================
46
  print("🤖 Initializing Edge-native Vision-Telemetry Model...")
47
  model_id = "vikhyatk/moondream2"
48
+
49
+ # Removing the old revision tag forces transformers to fetch their updated, stable script
50
+ model = AutoModelForCausalLM.from_pretrained(
51
+ model_id,
52
+ trust_remote_code=True
53
+ )
54
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
55
 
56
  def process_kitchen_operations(input_image, budget, days):
57
  if input_image is None: