anzorq commited on
Commit
273178c
·
1 Parent(s): 48289a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -8,7 +8,7 @@ tgt_lang="zu"
8
 
9
  # tokenizer = AutoTokenizer.from_pretrained(model_path, src_lang=src_lang)
10
  tokenizer = AutoTokenizer.from_pretrained(model_path)
11
- model = AutoModelForSeq2SeqLM.from_pretrained(model_path)#, load_in_4bit=True, device_map="auto")
12
 
13
  def translate(text, num_beams=4, num_return_sequences=4):
14
  inputs = tokenizer(text, return_tensors="pt")
 
8
 
9
  # tokenizer = AutoTokenizer.from_pretrained(model_path, src_lang=src_lang)
10
  tokenizer = AutoTokenizer.from_pretrained(model_path)
11
+ model = AutoModelForSeq2SeqLM.from_pretrained(model_path, use_safetensors=True)#, load_in_4bit=True, device_map="auto")
12
 
13
  def translate(text, num_beams=4, num_return_sequences=4):
14
  inputs = tokenizer(text, return_tensors="pt")