IinjyI commited on
Commit
bbede20
1 Parent(s): cd7695b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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")