Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,7 +12,7 @@ def predict_en(sketch):
|
|
| 12 |
|
| 13 |
def predict_zh(sketch):
|
| 14 |
generated_text = pipeline_zh(sketch, num_beams=3, do_sample=True, max_length=200)[0]['generated_text']
|
| 15 |
-
return generated_text
|
| 16 |
|
| 17 |
|
| 18 |
|
|
@@ -33,7 +33,7 @@ with gr.Blocks() as demo:
|
|
| 33 |
with gr.Tab("Chinese"):
|
| 34 |
input2 = gr.Textbox(lines=5, value="自然语言处理[MASK]谷歌公司[MASK]通用人工智能[MASK]")
|
| 35 |
output2 = gr.Textbox(lines=5)
|
| 36 |
-
output2 = output2
|
| 37 |
button2 = gr.Button("Generate")
|
| 38 |
|
| 39 |
# with gr.Accordion("Open for More!"):
|
|
|
|
| 12 |
|
| 13 |
def predict_zh(sketch):
|
| 14 |
generated_text = pipeline_zh(sketch, num_beams=3, do_sample=True, max_length=200)[0]['generated_text']
|
| 15 |
+
return generated_text.replace(' ','')
|
| 16 |
|
| 17 |
|
| 18 |
|
|
|
|
| 33 |
with gr.Tab("Chinese"):
|
| 34 |
input2 = gr.Textbox(lines=5, value="自然语言处理[MASK]谷歌公司[MASK]通用人工智能[MASK]")
|
| 35 |
output2 = gr.Textbox(lines=5)
|
| 36 |
+
output2 = output2
|
| 37 |
button2 = gr.Button("Generate")
|
| 38 |
|
| 39 |
# with gr.Accordion("Open for More!"):
|