pierreguillou
commited on
Commit
·
17d6209
1
Parent(s):
03f879f
Update app.py
Browse files
app.py
CHANGED
@@ -105,7 +105,7 @@ def app_outputs(uploaded_pdf):
|
|
105 |
return msg, img_files[0], img_files[1], images[0], images[1], csv_files[0], csv_files[1], df[0], df[1]
|
106 |
|
107 |
# gradio APP
|
108 |
-
with gr.Blocks(title="Inference APP for Document Understanding at
|
109 |
gr.HTML("""
|
110 |
<div style="font-family:'Times New Roman', 'Serif'; font-size:26pt; font-weight:bold; text-align:center;"><h1>Inference APP for Document Understanding at line level (v1)</h1></div>
|
111 |
<div style="margin-top: 40px"><p>(02/12/2023) This Inference APP uses the <a style="text-decoration: none; border-bottom: #64b5f6 0.125em solid; color: #64b5f6" href="https://huggingface.co/pierreguillou/lilt-xlm-roberta-base-finetuned-with-DocLayNet-base-at-linelevel-ml384" target="_blank">model LiLT base combined with XLM-RoBERTa base and finetuned on the dataset DocLayNet base at line level</a> (chunk size of 384 tokens).</p></div>
|
@@ -136,7 +136,7 @@ with gr.Blocks(title="Inference APP for Document Understanding at line level (v1
|
|
136 |
with gr.Row():
|
137 |
csvboxes = []
|
138 |
for num_page in range(max_imgboxes):
|
139 |
-
csv = gr.File(visible=True, label=f"CSV file at
|
140 |
csvboxes.append(csv)
|
141 |
with gr.Row():
|
142 |
dfboxes = []
|
|
|
105 |
return msg, img_files[0], img_files[1], images[0], images[1], csv_files[0], csv_files[1], df[0], df[1]
|
106 |
|
107 |
# gradio APP
|
108 |
+
with gr.Blocks(title="Inference APP for Document Understanding at paragraph level (v1)", css=".gradio-container") as demo:
|
109 |
gr.HTML("""
|
110 |
<div style="font-family:'Times New Roman', 'Serif'; font-size:26pt; font-weight:bold; text-align:center;"><h1>Inference APP for Document Understanding at line level (v1)</h1></div>
|
111 |
<div style="margin-top: 40px"><p>(02/12/2023) This Inference APP uses the <a style="text-decoration: none; border-bottom: #64b5f6 0.125em solid; color: #64b5f6" href="https://huggingface.co/pierreguillou/lilt-xlm-roberta-base-finetuned-with-DocLayNet-base-at-linelevel-ml384" target="_blank">model LiLT base combined with XLM-RoBERTa base and finetuned on the dataset DocLayNet base at line level</a> (chunk size of 384 tokens).</p></div>
|
|
|
136 |
with gr.Row():
|
137 |
csvboxes = []
|
138 |
for num_page in range(max_imgboxes):
|
139 |
+
csv = gr.File(visible=True, label=f"CSV file at paragraph level (page {num_page})")
|
140 |
csvboxes.append(csv)
|
141 |
with gr.Row():
|
142 |
dfboxes = []
|