Spaces:
Sleeping
Sleeping
neoguojing
commited on
Commit
·
fdd016a
1
Parent(s):
9e14b49
up
Browse files
app.py
CHANGED
@@ -110,7 +110,25 @@ def create_ui():
|
|
110 |
with gr.Group():
|
111 |
components["sam_output"] = gr.Gallery(elem_id='sam_output',label='输出',columns=1,interactive=False)
|
112 |
|
113 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
114 |
|
115 |
create_event_handlers()
|
116 |
return demo
|
|
|
110 |
with gr.Group():
|
111 |
components["sam_output"] = gr.Gallery(elem_id='sam_output',label='输出',columns=1,interactive=False)
|
112 |
|
113 |
+
with gr.Tab("OCR"):
|
114 |
+
with gr.Row():
|
115 |
+
with gr.Column(scale=2):
|
116 |
+
components["algo_type"] = gr.Dropdown(
|
117 |
+
["OCR","DoNut"],value="DoNut",
|
118 |
+
label="算法类别",interactive=True
|
119 |
+
)
|
120 |
+
with gr.Column(scale=2):
|
121 |
+
components["submit_ocr_btn"] = gr.Button(value="解析")
|
122 |
+
|
123 |
+
with gr.Row():
|
124 |
+
with gr.Column(scale=2):
|
125 |
+
with gr.Row(elem_id=''):
|
126 |
+
with gr.Group():
|
127 |
+
components["ocr_input"] = gr.Gallery(elem_id='ocr-input',label='输入',columns=2,type="pil")
|
128 |
+
with gr.Column(scale=2):
|
129 |
+
with gr.Row():
|
130 |
+
with gr.Group():
|
131 |
+
components["ocr_output"] = gr.Gallery(elem_id='ocr_output',label='输出',columns=2,interactive=False)
|
132 |
|
133 |
create_event_handlers()
|
134 |
return demo
|