breadlicker45 commited on
Commit
d8982cb
·
verified ·
1 Parent(s): eb1d7b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -20,8 +20,8 @@ print(f"Using device: {device}")
20
  print(f"Loading model: {MODEL_ID}...")
21
  try:
22
  # Load tokenizer and model, providing the token for private access
23
- tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, token=HF_TOKEN)
24
- model = AutoModelForSequenceClassification.from_pretrained(MODEL_ID, token=HF_TOKEN)
25
 
26
  # Move the model to the selected device ONCE for efficiency
27
  model.to(device)
 
20
  print(f"Loading model: {MODEL_ID}...")
21
  try:
22
  # Load tokenizer and model, providing the token for private access
23
+ tokenizer = AutoTokenizer.from_pretrained(MODEL_ID, token=HF_TOKEN, trust_remote_code=True)
24
+ model = AutoModelForSequenceClassification.from_pretrained(MODEL_ID, token=HF_TOKEN,trust_remote_code=True, num_labels=3)
25
 
26
  # Move the model to the selected device ONCE for efficiency
27
  model.to(device)