Update app.py
Browse files
app.py
CHANGED
@@ -38,8 +38,8 @@ device = torch.device('cuda' if 'cuda' in device_name and torch.cuda.is_availabl
|
|
38 |
print(f"🧠 Using device: {device}")
|
39 |
|
40 |
print("...Loading Grounding DINO model...")
|
41 |
-
# --- ⬇️
|
42 |
-
gnd_model_id = "IDEA-Research/grounding-dino-
|
43 |
processor_gnd = AutoProcessor.from_pretrained(gnd_model_id)
|
44 |
model_gnd = AutoModelForZeroShotObjectDetection.from_pretrained(gnd_model_id).to(device)
|
45 |
|
@@ -302,5 +302,6 @@ def compare_items():
|
|
302 |
print(f"❌ Error in /compare: {e}")
|
303 |
traceback.print_exc()
|
304 |
return jsonify({"error": str(e)}), 500
|
|
|
305 |
if __name__ == '__main__':
|
306 |
app.run(host='0.0.0.0', port=7860)
|
|
|
38 |
print(f"🧠 Using device: {device}")
|
39 |
|
40 |
print("...Loading Grounding DINO model...")
|
41 |
+
# --- ⬇️ CORRECTED MODEL ID ⬇️ ---
|
42 |
+
gnd_model_id = "IDEA-Research/grounding-dino-base"
|
43 |
processor_gnd = AutoProcessor.from_pretrained(gnd_model_id)
|
44 |
model_gnd = AutoModelForZeroShotObjectDetection.from_pretrained(gnd_model_id).to(device)
|
45 |
|
|
|
302 |
print(f"❌ Error in /compare: {e}")
|
303 |
traceback.print_exc()
|
304 |
return jsonify({"error": str(e)}), 500
|
305 |
+
|
306 |
if __name__ == '__main__':
|
307 |
app.run(host='0.0.0.0', port=7860)
|