Luke
commited on
Commit
·
2792f82
1
Parent(s):
0347dd6
no message
Browse files
app.py
CHANGED
@@ -124,23 +124,26 @@ with gr.Blocks() as demo:
|
|
124 |
validation_type = gr.Dropdown(choices=["全文分析", "身分證正面", "身分證反面"], value='全文分析',
|
125 |
label="驗證類別")
|
126 |
language_dropdown = gr.Dropdown(choices=languages, value="chi_tra", label="語言")
|
|
|
127 |
with gr.Row():
|
128 |
with gr.Column():
|
129 |
preImg_button = gr.Button("圖片預先處理")
|
130 |
gr.Markdown(
|
131 |
-
"<div style='display: flex;justify-content: center;align-items: center;background-color:
|
|
|
|
|
132 |
with gr.Column():
|
133 |
ocr_button = gr.Button("使用 Pytesseract OCR 辨識")
|
134 |
gr.Markdown(
|
135 |
-
"<div style='display: flex;justify-content: center;align-items: center;background-color:
|
136 |
with gr.Column():
|
137 |
llm_button = gr.Button("使用 AI LLM 模型辨識")
|
138 |
gr.Markdown(
|
139 |
-
"<div style='display: flex;justify-content: center;align-items: center;background-color:
|
140 |
with gr.Column():
|
141 |
pytesseractJS_button = gr.Button("使用 PytesseractJS 模型辨識")
|
142 |
gr.Markdown(
|
143 |
-
"<div style='display: flex;justify-content: center;align-items: center;background-color:
|
144 |
|
145 |
with gr.Row():
|
146 |
preprocess_output_001 = gr.Image(type="pil", label="預處理後的圖片-方案一")
|
|
|
124 |
validation_type = gr.Dropdown(choices=["全文分析", "身分證正面", "身分證反面"], value='全文分析',
|
125 |
label="驗證類別")
|
126 |
language_dropdown = gr.Dropdown(choices=languages, value="chi_tra", label="語言")
|
127 |
+
|
128 |
with gr.Row():
|
129 |
with gr.Column():
|
130 |
preImg_button = gr.Button("圖片預先處理")
|
131 |
gr.Markdown(
|
132 |
+
"<div style='display: flex;justify-content: center;align-items: center;background-color: #ffdf00;font-weight: bold;text-decoration: underline;font-size: 20px;'>多模態預處理圖像</div>")
|
133 |
+
|
134 |
+
with gr.Row():
|
135 |
with gr.Column():
|
136 |
ocr_button = gr.Button("使用 Pytesseract OCR 辨識")
|
137 |
gr.Markdown(
|
138 |
+
"<div style='display: flex;justify-content: center;align-items: center;background-color: #ffdf00;font-weight: bold;text-decoration: underline;font-size: 20px;'>Package: Google Pytesseract</div>")
|
139 |
with gr.Column():
|
140 |
llm_button = gr.Button("使用 AI LLM 模型辨識")
|
141 |
gr.Markdown(
|
142 |
+
"<div style='display: flex;justify-content: center;align-items: center;background-color: #ffdf00;font-weight: bold;text-decoration: underline;font-size: 20px;'>Package:Bert-base-chinese</div>")
|
143 |
with gr.Column():
|
144 |
pytesseractJS_button = gr.Button("使用 PytesseractJS 模型辨識")
|
145 |
gr.Markdown(
|
146 |
+
"<div style='display: flex;justify-content: center;align-items: center;background-color: #ffdf00;font-weight: bold;text-decoration: underline;font-size: 20px;'>Package:PytesseractJS</div>")
|
147 |
|
148 |
with gr.Row():
|
149 |
preprocess_output_001 = gr.Image(type="pil", label="預處理後的圖片-方案一")
|