Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -12,8 +12,9 @@ import streamlit as st
|
|
12 |
|
13 |
#language translation function
|
14 |
def translate(text):
|
|
|
15 |
tokenizer = AutoTokenizer.from_pretrained(".",use_auth_token=True)
|
16 |
-
|
17 |
model = AutoModelForSeq2SeqLM.from_pretrained(".",use_auth_token=True)
|
18 |
model.config.to_json()
|
19 |
inputs = tokenizer(text, return_tensors="pt")
|
|
|
12 |
|
13 |
#language translation function
|
14 |
def translate(text):
|
15 |
+
tokenizer = AutoTokenizer.from_pretrained("facebook/nllb-200-distilled-600M",use_auth_token=True)
|
16 |
tokenizer = AutoTokenizer.from_pretrained(".",use_auth_token=True)
|
17 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("facebook/nllb-200-distilled-600M",use_auth_token=True)
|
18 |
model = AutoModelForSeq2SeqLM.from_pretrained(".",use_auth_token=True)
|
19 |
model.config.to_json()
|
20 |
inputs = tokenizer(text, return_tensors="pt")
|