raheelqader commited on
Commit
209102c
·
verified ·
1 Parent(s): 4c18b68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -39,8 +39,8 @@ def format_input(src, tgt_lang, src_lang, domain):
39
 
40
  # Initialize model and tokenizer globally to avoid reloading
41
  model_id = "LinguaCustodia/multilingual-multidomain-fin-mt-70M"
42
- auth_token = os.environ.get("TOKEN") or True
43
- tokenizer = AutoTokenizer.from_pretrained(model_id, use_auth_token=auth_token)
44
  model = AutoModelForCausalLM.from_pretrained(model_id)
45
 
46
  def translate(text, source_lang, target_lang, domain):
 
39
 
40
  # Initialize model and tokenizer globally to avoid reloading
41
  model_id = "LinguaCustodia/multilingual-multidomain-fin-mt-70M"
42
+ auth_token = os.environ.get("TOKEN")
43
+ tokenizer = AutoTokenizer.from_pretrained(model_id, token=auth_token)
44
  model = AutoModelForCausalLM.from_pretrained(model_id)
45
 
46
  def translate(text, source_lang, target_lang, domain):