Spaces:
Runtime error
Runtime error
Salmaelbarbori
commited on
Commit
·
397fde2
1
Parent(s):
d9fad4e
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ def translation(text):
|
|
11 |
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
|
12 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)
|
13 |
#inference
|
14 |
-
inputs = tokenizer("translate to
|
15 |
output = model.generate(**inputs)
|
16 |
output = tokenizer.decode(output.cpu().numpy()[0], skip_special_tokens=True)
|
17 |
|
|
|
11 |
tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
|
12 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_checkpoint)
|
13 |
#inference
|
14 |
+
inputs = tokenizer("translate to darija : " + text, return_tensors="pt")
|
15 |
output = model.generate(**inputs)
|
16 |
output = tokenizer.decode(output.cpu().numpy()[0], skip_special_tokens=True)
|
17 |
|