Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -20,8 +20,8 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
|
|
20 |
# Apply the patch
|
21 |
from unittest.mock import patch
|
22 |
with patch("transformers.dynamic_module_utils.get_imports", fixed_get_imports):
|
23 |
-
model = AutoModelForCausalLM.from_pretrained("
|
24 |
-
processor = AutoProcessor.from_pretrained("
|
25 |
|
26 |
# Initialize FastAPI
|
27 |
app = FastAPI()
|
|
|
20 |
# Apply the patch
|
21 |
from unittest.mock import patch
|
22 |
with patch("transformers.dynamic_module_utils.get_imports", fixed_get_imports):
|
23 |
+
model = AutoModelForCausalLM.from_pretrained("numberPlate_model_2", trust_remote_code=True).to(device)
|
24 |
+
processor = AutoProcessor.from_pretrained("numberPlate_model_2", trust_remote_code=True)
|
25 |
|
26 |
# Initialize FastAPI
|
27 |
app = FastAPI()
|