Update app.py to avoid using specific VLM model version
Browse files
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 |
-
|
| 46 |
-
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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:
|