Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,7 +10,7 @@ from huggingface_hub import hf_hub_download
|
|
10 |
# 1. LOAD MODEL, TOKENIZER, AND LABEL ENCODER
|
11 |
# =============================================================================
|
12 |
# Define the path to your model repository
|
13 |
-
model_path = "Tarive/esm2_t12_35M_UR50D-
|
14 |
|
15 |
print("Loading tokenizer...")
|
16 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
@@ -24,7 +24,7 @@ print(f"Model loaded on device: {device}")
|
|
24 |
|
25 |
# Download and load the label encoder
|
26 |
print("Downloading and loading label encoder...")
|
27 |
-
encoder_path = hf_hub_download(repo_id=model_path, filename="
|
28 |
with open(encoder_path, "rb") as f:
|
29 |
label_encoder = pickle.load(f)
|
30 |
print("Label encoder loaded.")
|
|
|
10 |
# 1. LOAD MODEL, TOKENIZER, AND LABEL ENCODER
|
11 |
# =============================================================================
|
12 |
# Define the path to your model repository
|
13 |
+
model_path = "Tarive/esm2_t12_35M_UR50D-finetuned-pfam-1k"
|
14 |
|
15 |
print("Loading tokenizer...")
|
16 |
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
|
|
24 |
|
25 |
# Download and load the label encoder
|
26 |
print("Downloading and loading label encoder...")
|
27 |
+
encoder_path = hf_hub_download(repo_id=model_path, filename="label_encoder.pkl")
|
28 |
with open(encoder_path, "rb") as f:
|
29 |
label_encoder = pickle.load(f)
|
30 |
print("Label encoder loaded.")
|