Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ def perform_inference(text, dataset):
|
|
47 |
'position': result[0]['position']
|
48 |
})
|
49 |
|
50 |
-
return result, text
|
51 |
|
52 |
|
53 |
demo = gr.Blocks()
|
@@ -72,12 +72,13 @@ with demo:
|
|
72 |
gr.Markdown("This demo support many other language as well, you can try and explore the results of other languages by yourself.")
|
73 |
|
74 |
with gr.Column():
|
|
|
75 |
output_df = gr.DataFrame(label="Prediction Results:")
|
76 |
output_dfs.append(output_df)
|
77 |
|
78 |
inference_button.click(fn=perform_inference,
|
79 |
inputs=[input_sentence, dataset_ids],
|
80 |
-
outputs=[output_df,
|
81 |
|
82 |
gr.Markdown("")
|
83 |
|
|
|
47 |
'position': result[0]['position']
|
48 |
})
|
49 |
|
50 |
+
return result, '{}'.format(dataset, text)
|
51 |
|
52 |
|
53 |
demo = gr.Blocks()
|
|
|
72 |
gr.Markdown("This demo support many other language as well, you can try and explore the results of other languages by yourself.")
|
73 |
|
74 |
with gr.Column():
|
75 |
+
output_text = gr.TextArea(label="Example:")
|
76 |
output_df = gr.DataFrame(label="Prediction Results:")
|
77 |
output_dfs.append(output_df)
|
78 |
|
79 |
inference_button.click(fn=perform_inference,
|
80 |
inputs=[input_sentence, dataset_ids],
|
81 |
+
outputs=[output_df, output_text])
|
82 |
|
83 |
gr.Markdown("")
|
84 |
|