Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -156,7 +156,7 @@ md1 = "Translate - 100 Languages"
|
|
156 |
|
157 |
|
158 |
with gr.Blocks() as transbot:
|
159 |
-
|
160 |
with gr.Row():
|
161 |
gr.Column()
|
162 |
with gr.Column():
|
@@ -168,7 +168,7 @@ with gr.Blocks() as transbot:
|
|
168 |
with gr.Row():
|
169 |
gr.Column()
|
170 |
with gr.Column():
|
171 |
-
md = gr.Markdown(""
|
172 |
with gr.Row():
|
173 |
lang_from = gr.Dropdown(label="From:", choices=list(lang_id.keys()),value="English")
|
174 |
lang_to = gr.Dropdown(label="To:", choices=list(lang_id.keys()),value="Chinese")
|
@@ -178,7 +178,7 @@ with gr.Blocks() as transbot:
|
|
178 |
message = gr.Textbox(label="Prompt",placeholder="Enter Prompt",lines=4)
|
179 |
translated = gr.Textbox(label="Translated",lines=4,interactive=False)
|
180 |
gr.Column()
|
181 |
-
t_submit.click(trans_page,[
|
182 |
submit.click(trans_to, inputs=[message,lang_from,lang_to], outputs=[translated])
|
183 |
transbot.queue(concurrency_count=20)
|
184 |
transbot.launch()
|
|
|
156 |
|
157 |
|
158 |
with gr.Blocks() as transbot:
|
159 |
+
this=gr.State()
|
160 |
with gr.Row():
|
161 |
gr.Column()
|
162 |
with gr.Column():
|
|
|
168 |
with gr.Row():
|
169 |
gr.Column()
|
170 |
with gr.Column():
|
171 |
+
md = gr.Markdown("""<h1><center>Translate - 100 Languages</center></h1><h4><center>Translation may not be accurate</center></h4>""")
|
172 |
with gr.Row():
|
173 |
lang_from = gr.Dropdown(label="From:", choices=list(lang_id.keys()),value="English")
|
174 |
lang_to = gr.Dropdown(label="To:", choices=list(lang_id.keys()),value="Chinese")
|
|
|
178 |
message = gr.Textbox(label="Prompt",placeholder="Enter Prompt",lines=4)
|
179 |
translated = gr.Textbox(label="Translated",lines=4,interactive=False)
|
180 |
gr.Column()
|
181 |
+
t_submit.click(trans_page,[this,t_space],[this])
|
182 |
submit.click(trans_to, inputs=[message,lang_from,lang_to], outputs=[translated])
|
183 |
transbot.queue(concurrency_count=20)
|
184 |
transbot.launch()
|