SeyedAli commited on
Commit
7c92b42
1 Parent(s): 3d807a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -9,10 +9,9 @@ text_input = gr.TextArea(label="جمله انگلیسی",text_align="left",rtl=T
9
  text_output = gr.TextArea(label="ترجمه فارسی",text_align="right",rtl=True,type="text")
10
 
11
  def Translate(text, **generator_args):
12
- input_ids = tokenizer.encode(input_string, return_tensors="pt")
13
  res = model.generate(input_ids, **generator_args)
14
  output = tokenizer.batch_decode(res, skip_special_tokens=True)
15
- print(output)
16
  return output
17
 
18
  iface = gr.Interface(fn=Translate, inputs=text_input, outputs=text_output)
 
9
  text_output = gr.TextArea(label="ترجمه فارسی",text_align="right",rtl=True,type="text")
10
 
11
  def Translate(text, **generator_args):
12
+ input_ids = tokenizer.encode(text, return_tensors="pt")
13
  res = model.generate(input_ids, **generator_args)
14
  output = tokenizer.batch_decode(res, skip_special_tokens=True)
 
15
  return output
16
 
17
  iface = gr.Interface(fn=Translate, inputs=text_input, outputs=text_output)