Vihang28 commited on
Commit
24351d4
·
verified ·
1 Parent(s): 810aa34

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -0
app.py CHANGED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+ from symspellpy import SymSpell
3
+
4
+ with gr.Blocks(title=title) as demo:
5
+ gr.Markdown(f'<h1 style="text-align: center; margin-bottom: 1rem;">{title}</h1>')
6
+ gr.Markdown(description)
7
+ with gr.Row():
8
+ with gr.Column():
9
+ image = gr.Textbox(placeholder="Enter Text..", label="Input")
10
+ with gr.Row():
11
+ btn_clear = gr.ClearButton([image])
12
+ btn_submit = gr.Button(value="Submit", variant="primary")
13
+ with gr.Column():
14
+ text = gr.Textbox(label="Output")
15
+
16
+ btn_submit.click(ocr_model, inputs=[image], outputs=text, api_name="PaddleOCR")
17
+ btn_clear.add(text)
18
+
19
+ gr.Markdown(article)
20
+
21
+ if __name__ == '__main__':
22
+ demo.launch()