Spaces:
Runtime error
Runtime error
Commit
·
6560d82
1
Parent(s):
b955f76
Update app.py
Browse files
app.py
CHANGED
@@ -9,9 +9,9 @@ def translation(text):
|
|
9 |
|
10 |
model_checkpoint = "bigscience/mt0-base"
|
11 |
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
|
12 |
-
model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)
|
13 |
#inference
|
14 |
-
inputs = tokenizer("translate to arabic : hi, I am salma and you?", return_tensors="pt")
|
15 |
output = model.generate(**inputs)
|
16 |
output = tokenizer.decode(output.cpu().numpy()[0])
|
17 |
|
|
|
9 |
|
10 |
model_checkpoint = "bigscience/mt0-base"
|
11 |
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
|
12 |
+
model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)
|
13 |
#inference
|
14 |
+
inputs = tokenizer("translate to arabic : hi, I am salma and you?", return_tensors="pt")
|
15 |
output = model.generate(**inputs)
|
16 |
output = tokenizer.decode(output.cpu().numpy()[0])
|
17 |
|