Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ from transformers import AutoProcessor, AutoModelForCausalLM
|
|
10 |
|
11 |
# Load model and processor, enabling trust_remote_code if needed
|
12 |
model_name = "PJMixers-Images/Florence-2-base-Castollux-v0.5"
|
13 |
-
model = AutoModelForCausalLM.from_pretrained(model_name, attn_implementation="
|
14 |
processor = AutoProcessor.from_pretrained(model_name, trust_remote_code=True)
|
15 |
|
16 |
# Set device (GPU if available)
|
|
|
10 |
|
11 |
# Load model and processor, enabling trust_remote_code if needed
|
12 |
model_name = "PJMixers-Images/Florence-2-base-Castollux-v0.5"
|
13 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, attn_implementation="flash_attention_2", trust_remote_code=True).eval()
|
14 |
processor = AutoProcessor.from_pretrained(model_name, trust_remote_code=True)
|
15 |
|
16 |
# Set device (GPU if available)
|