nhatminh commited on
Commit
cb2d3a8
·
verified ·
1 Parent(s): 6ae3d2e

Create hehe

Browse files
Files changed (1) hide show
  1. hehe +27 -0
hehe ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ def validate_and_fix(sentence):
4
+ corrected_sentence = fix_error(sentence)
5
+ return corrected_sentence
6
+
7
+ # Gradio interface
8
+ def interface(sentence):
9
+ status, result = validate_and_fix(sentence)
10
+ return f"{status}", f"{result}"
11
+
12
+ with gr.Blocks() as demo:
13
+ gr.Markdown("## Korean Sentence Error Fixer")
14
+
15
+ with gr.Row():
16
+ sentence_input = gr.Textbox(label="Input Korean Sentence")
17
+
18
+ with gr.Row():
19
+ submit_button = gr.Button("Submit")
20
+
21
+ with gr.Row():
22
+ output_corrected = gr.Textbox(label="Corrected Sentence", interactive=False)
23
+
24
+ submit_button.click(interface, inputs=[sentence_input], outputs=[output_corrected])
25
+
26
+ # Launch the Gradio app
27
+ demo.launch()