nilotpaldhar2004 commited on
Commit
bf7ba46
Β·
verified Β·
1 Parent(s): deb9e1f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -26,7 +26,8 @@ DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
26
 
27
  # ── Model Initialization ──────────────────────────────────────────────────────
28
  print(f"[INFO] Loading model: {MODEL_NAME} | device: {DEVICE}")
29
- tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
 
30
  model = AutoModelForSeq2SeqLM.from_pretrained(MODEL_NAME).to(DEVICE)
31
  model.eval()
32
  print("[INFO] Model ready.")
 
26
 
27
  # ── Model Initialization ──────────────────────────────────────────────────────
28
  print(f"[INFO] Loading model: {MODEL_NAME} | device: {DEVICE}")
29
+ # Force use_fast=False to avoid the sentencepiece backend error
30
+ tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME, use_fast=False)
31
  model = AutoModelForSeq2SeqLM.from_pretrained(MODEL_NAME).to(DEVICE)
32
  model.eval()
33
  print("[INFO] Model ready.")