Update app.py
Browse files
app.py
CHANGED
@@ -113,7 +113,7 @@ def translate(text):
|
|
113 |
summarized = summarize(text)
|
114 |
tokenized = tokenizer([summarized], return_tensors='np')
|
115 |
out = model.generate(**tokenized)
|
116 |
-
arabic = tokenizer.decode(out, skip_special_tokens=True)
|
117 |
return arabic
|
118 |
|
119 |
demo = gr.Interface(fn=translate, inputs="text", outputs="text")
|
|
|
113 |
summarized = summarize(text)
|
114 |
tokenized = tokenizer([summarized], return_tensors='np')
|
115 |
out = model.generate(**tokenized)
|
116 |
+
arabic = tokenizer.decode(out[0], skip_special_tokens=True)
|
117 |
return arabic
|
118 |
|
119 |
demo = gr.Interface(fn=translate, inputs="text", outputs="text")
|