Spaces:
Sleeping
Sleeping
Commit
·
021b291
1
Parent(s):
df0c62c
Update app.py
Browse files
app.py
CHANGED
@@ -63,14 +63,12 @@ def translate_gradio(input):
|
|
63 |
text_ar = tokenizer.batch_decode(encode,skip_special_tokens=True)[0]
|
64 |
return text_ar'''
|
65 |
|
66 |
-
|
67 |
-
response = requests.get("https://d1yjjnpx0p53s8.cloudfront.net/styles/logo-thumbnail/s3/102016/untitled-3_3.jpg?itok=JLozvn8d")
|
68 |
translate_interface = gr.Interface(fn = translate,
|
69 |
allow_flagging = True,
|
70 |
flagging_dir = 'flagged/logs',
|
71 |
-
|
72 |
-
|
73 |
-
inputs=gr.inputs.Textbox(lines = 7, label = 'english content'),
|
74 |
outputs="text",
|
75 |
examples = [['In the last few years the RNN-based architectures have shown the best performance in machine translation problems, but still they have some problems that had to be solved. First, they have a difficulty to cope with long-range dependencies (also LSTM when it has to deal with really long sentences). Secondly, each hidden state depends on the previous one which impossible to parallelize and makes it inefficient on GPUs.']]
|
76 |
)
|
|
|
63 |
text_ar = tokenizer.batch_decode(encode,skip_special_tokens=True)[0]
|
64 |
return text_ar'''
|
65 |
|
66 |
+
|
|
|
67 |
translate_interface = gr.Interface(fn = translate,
|
68 |
allow_flagging = True,
|
69 |
flagging_dir = 'flagged/logs',
|
70 |
+
title = 'Translating "English Data Science" content into Arabic',
|
71 |
+
inputs=gr.inputs.Textbox(lines = 7, label = 'English content'),
|
|
|
72 |
outputs="text",
|
73 |
examples = [['In the last few years the RNN-based architectures have shown the best performance in machine translation problems, but still they have some problems that had to be solved. First, they have a difficulty to cope with long-range dependencies (also LSTM when it has to deal with really long sentences). Secondly, each hidden state depends on the previous one which impossible to parallelize and makes it inefficient on GPUs.']]
|
74 |
)
|