Spaces:
Build error
Build error
linjieccc
commited on
Commit
·
c587bf9
1
Parent(s):
b1b4090
Update examples and refine instroduction
Browse files- app.py +8 -28
- book.png +0 -3
- exam.png +0 -3
- header.html +2 -2
- medical_bill_1.png +0 -3
- website_design_guide.jpeg +0 -3
app.py
CHANGED
|
@@ -115,25 +115,17 @@ examples = [
|
|
| 115 |
"budget_form.png",
|
| 116 |
"What is the total actual and/or obligated expenses of ECG Center?"
|
| 117 |
],
|
| 118 |
-
[
|
| 119 |
-
"medical_bill_2.jpg",
|
| 120 |
-
"患者さんは何でお金を払いますか。"
|
| 121 |
-
],
|
| 122 |
-
[
|
| 123 |
-
"receipt.png",
|
| 124 |
-
"เบอร์โทรร้านอะไรคะ?"
|
| 125 |
-
],
|
| 126 |
[
|
| 127 |
"poster.png",
|
| 128 |
"Which gift idea needs a printer?"
|
| 129 |
],
|
| 130 |
-
|
| 131 |
-
"
|
| 132 |
-
"
|
| 133 |
],
|
| 134 |
[
|
| 135 |
-
"
|
| 136 |
-
"
|
| 137 |
],
|
| 138 |
[
|
| 139 |
"resume.png",
|
|
@@ -147,28 +139,16 @@ examples = [
|
|
| 147 |
"invoice.jpg",
|
| 148 |
"发票号码是多少?",
|
| 149 |
],
|
| 150 |
-
[
|
| 151 |
-
"medical_bill_1.png",
|
| 152 |
-
"票据的具体名称是什么?"
|
| 153 |
-
],
|
| 154 |
-
[
|
| 155 |
-
"website_design_guide.jpeg",
|
| 156 |
-
"Which quality component has the icon of a pen in it?"
|
| 157 |
-
],
|
| 158 |
]
|
| 159 |
|
| 160 |
prompt_files = {
|
| 161 |
"发票号码是多少?": "invoice.jpg",
|
| 162 |
"五百丁本次想要担任的是什么职位?": "resume.png",
|
| 163 |
"在哪个口岸进口?": "custom_declaration_form.png",
|
| 164 |
-
"票据的具体名称是什么?": "medical_bill_1.png",
|
| 165 |
"What is the total actual and/or obligated expenses of ECG Center?": "budget_form.png",
|
| 166 |
-
"Which quality component has the icon of a pen in it?": "website_design_guide.jpeg",
|
| 167 |
"Which gift idea needs a printer?": "poster.png",
|
| 168 |
"患者さんは何でお金を払いますか。": "medical_bill_2.jpg",
|
| 169 |
"เบอร์โทรร้านอะไรคะ?": "receipt.png",
|
| 170 |
-
"试卷当前部分考察什么内容?": "exam.png",
|
| 171 |
-
"For Rage, who is the author listed as? ": "book.png",
|
| 172 |
}
|
| 173 |
|
| 174 |
|
|
@@ -431,15 +411,15 @@ with gr.Blocks(css=CSS) as demo:
|
|
| 431 |
with gr.Column() as col:
|
| 432 |
gr.Markdown("## 2. Make a request")
|
| 433 |
prompt = gr.Textbox(
|
| 434 |
-
label="Prompt",
|
| 435 |
placeholder="e.g. What is the total actual and/or obligated expenses of ECG Center?",
|
| 436 |
lines=1,
|
| 437 |
max_lines=1,
|
| 438 |
)
|
| 439 |
ocr_lang = gr.Radio(
|
| 440 |
choices=["ch", "en"],
|
| 441 |
-
value="
|
| 442 |
-
label="OCR Language",
|
| 443 |
)
|
| 444 |
|
| 445 |
with gr.Row():
|
|
|
|
| 115 |
"budget_form.png",
|
| 116 |
"What is the total actual and/or obligated expenses of ECG Center?"
|
| 117 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 118 |
[
|
| 119 |
"poster.png",
|
| 120 |
"Which gift idea needs a printer?"
|
| 121 |
],
|
| 122 |
+
[
|
| 123 |
+
"receipt.png",
|
| 124 |
+
"เบอร์โทรร้านอะไรคะ?"
|
| 125 |
],
|
| 126 |
[
|
| 127 |
+
"medical_bill_2.jpg",
|
| 128 |
+
"患者さんは何でお金を払いますか。"
|
| 129 |
],
|
| 130 |
[
|
| 131 |
"resume.png",
|
|
|
|
| 139 |
"invoice.jpg",
|
| 140 |
"发票号码是多少?",
|
| 141 |
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
]
|
| 143 |
|
| 144 |
prompt_files = {
|
| 145 |
"发票号码是多少?": "invoice.jpg",
|
| 146 |
"五百丁本次想要担任的是什么职位?": "resume.png",
|
| 147 |
"在哪个口岸进口?": "custom_declaration_form.png",
|
|
|
|
| 148 |
"What is the total actual and/or obligated expenses of ECG Center?": "budget_form.png",
|
|
|
|
| 149 |
"Which gift idea needs a printer?": "poster.png",
|
| 150 |
"患者さんは何でお金を払いますか。": "medical_bill_2.jpg",
|
| 151 |
"เบอร์โทรร้านอะไรคะ?": "receipt.png",
|
|
|
|
|
|
|
| 152 |
}
|
| 153 |
|
| 154 |
|
|
|
|
| 411 |
with gr.Column() as col:
|
| 412 |
gr.Markdown("## 2. Make a request")
|
| 413 |
prompt = gr.Textbox(
|
| 414 |
+
label="Prompt (No restrictions on the setting of prompt.)",
|
| 415 |
placeholder="e.g. What is the total actual and/or obligated expenses of ECG Center?",
|
| 416 |
lines=1,
|
| 417 |
max_lines=1,
|
| 418 |
)
|
| 419 |
ocr_lang = gr.Radio(
|
| 420 |
choices=["ch", "en"],
|
| 421 |
+
value="en",
|
| 422 |
+
label="Select OCR Language. Please choose ch for Chinese images.",
|
| 423 |
)
|
| 424 |
|
| 425 |
with gr.Row():
|
book.png
DELETED
Git LFS Details
|
exam.png
DELETED
Git LFS Details
|
header.html
CHANGED
|
@@ -20,12 +20,12 @@
|
|
| 20 |
margin-bottom: 10px;
|
| 21 |
justify-content: center;
|
| 22 |
">
|
| 23 |
-
<a href="https://github.com/PaddlePaddle/PaddleNLP"><h1 style="font-weight: 900; align-items: center; margin-bottom: 7px;">
|
| 24 |
ERNIE-Layout DocPrompt Engine 🧾
|
| 25 |
</h1></a>
|
| 26 |
</div>
|
| 27 |
<p style="margin-bottom: 10px; font-size: 94%">
|
| 28 |
-
DocPrompt🔖 is a Document Prompt Engine
|
| 29 |
</p>
|
| 30 |
<a href="https://github.com/PaddlePaddle/PaddleNLP"><img src="https://user-images.githubusercontent.com/40840292/195516769-c4452d7c-3f9e-446f-8f9d-882b99052a5b.png" alt="star Paddlehub" width="100%"></a>
|
| 31 |
</div>
|
|
|
|
| 20 |
margin-bottom: 10px;
|
| 21 |
justify-content: center;
|
| 22 |
">
|
| 23 |
+
<a href="https://github.com/PaddlePaddle/PaddleNLP/tree/develop/model_zoo/ernie-layout"><h1 style="font-weight: 900; align-items: center; margin-bottom: 7px;">
|
| 24 |
ERNIE-Layout DocPrompt Engine 🧾
|
| 25 |
</h1></a>
|
| 26 |
</div>
|
| 27 |
<p style="margin-bottom: 10px; font-size: 94%">
|
| 28 |
+
DocPrompt🔖 is a Document Prompt Engine using [ERNIE-Layout](https://github.com/PaddlePaddle/PaddleNLP/tree/develop/model_zoo/ernie-layout) as the backbone model. The engine is powered by BAIDU WenXin Document Intelligence Team and has the ability for multilingual documents information extraction and question ansering.
|
| 29 |
</p>
|
| 30 |
<a href="https://github.com/PaddlePaddle/PaddleNLP"><img src="https://user-images.githubusercontent.com/40840292/195516769-c4452d7c-3f9e-446f-8f9d-882b99052a5b.png" alt="star Paddlehub" width="100%"></a>
|
| 31 |
</div>
|
medical_bill_1.png
DELETED
Git LFS Details
|
website_design_guide.jpeg
DELETED
Git LFS Details
|