Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,9 +22,11 @@ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
| 22 |
tokenizer = AutoTokenizer.from_pretrained("answerdotai/ModernBERT-base")
|
| 23 |
|
| 24 |
# Paths or URLs to your model weights
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
| 28 |
|
| 29 |
def load_model(base_path, url=None):
|
| 30 |
model = AutoModelForSequenceClassification.from_pretrained(
|
|
|
|
| 22 |
tokenizer = AutoTokenizer.from_pretrained("answerdotai/ModernBERT-base")
|
| 23 |
|
| 24 |
# Paths or URLs to your model weights
|
| 25 |
+
# --- Model and Tokenizer Setup ---
|
| 26 |
+
model1_path = "modernbert.bin"
|
| 27 |
+
model2_path = "https://huggingface.co/mihalykiss/modernbert_2/resolve/main/Model_groups_3class_seed12"
|
| 28 |
+
model3_path = "https://huggingface.co/mihalykiss/modernbert_2/resolve/main/Model_groups_3class_seed22"
|
| 29 |
+
|
| 30 |
|
| 31 |
def load_model(base_path, url=None):
|
| 32 |
model = AutoModelForSequenceClassification.from_pretrained(
|