Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -38,18 +38,25 @@ processor = ViTImageProcessor(
|
|
| 38 |
|
| 39 |
print("Loading custom model...")
|
| 40 |
|
| 41 |
-
config = AutoConfig.from_pretrained(
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
model = AutoModelForImageClassification.from_pretrained(
|
| 48 |
MODEL_REPO,
|
| 49 |
-
config=config,
|
| 50 |
token=HF_TOKEN,
|
| 51 |
trust_remote_code=True,
|
| 52 |
-
output_attentions=True
|
| 53 |
)
|
| 54 |
|
| 55 |
model.to(DEVICE)
|
|
|
|
| 38 |
|
| 39 |
print("Loading custom model...")
|
| 40 |
|
| 41 |
+
# config = AutoConfig.from_pretrained(
|
| 42 |
+
# MODEL_REPO,
|
| 43 |
+
# token=HF_TOKEN,
|
| 44 |
+
# trust_remote_code=True,
|
| 45 |
+
# )
|
| 46 |
+
|
| 47 |
+
# model = AutoModelForImageClassification.from_pretrained(
|
| 48 |
+
# MODEL_REPO,
|
| 49 |
+
# config=config,
|
| 50 |
+
# token=HF_TOKEN,
|
| 51 |
+
# trust_remote_code=True,
|
| 52 |
+
# output_attentions=True,
|
| 53 |
+
# )
|
| 54 |
|
| 55 |
model = AutoModelForImageClassification.from_pretrained(
|
| 56 |
MODEL_REPO,
|
|
|
|
| 57 |
token=HF_TOKEN,
|
| 58 |
trust_remote_code=True,
|
| 59 |
+
output_attentions=True
|
| 60 |
)
|
| 61 |
|
| 62 |
model.to(DEVICE)
|