hehehuhu / hehe
nhatminh's picture
Create hehe
cb2d3a8 verified
raw
history blame contribute delete
722 Bytes
import gradio as gr
def validate_and_fix(sentence):
corrected_sentence = fix_error(sentence)
return corrected_sentence
# Gradio interface
def interface(sentence):
status, result = validate_and_fix(sentence)
return f"{status}", f"{result}"
with gr.Blocks() as demo:
gr.Markdown("## Korean Sentence Error Fixer")
with gr.Row():
sentence_input = gr.Textbox(label="Input Korean Sentence")
with gr.Row():
submit_button = gr.Button("Submit")
with gr.Row():
output_corrected = gr.Textbox(label="Corrected Sentence", interactive=False)
submit_button.click(interface, inputs=[sentence_input], outputs=[output_corrected])
# Launch the Gradio app
demo.launch()