Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -105,14 +105,21 @@ with gr.Blocks(theme=theme) as demo:
|
|
105 |
# Update file_types to accept PDF as well as common image formats.
|
106 |
pdf_input = gr.File(label="π Upload Image file or PDF file", file_types=[".pdf", ".png", ".jpg", ".jpeg"])
|
107 |
|
108 |
-
with gr.Group():
|
109 |
task_dropdown = gr.Radio(["default", "structure"], label="π― Select Task", value="default")
|
110 |
gr.HTML("""
|
111 |
<p><b>default</b>: This mode works for most cases and is recommended for files without a clear template such as infographics.</p>
|
112 |
-
<p><b>structure</b>: This mode offers improved performance for structured documents such as
|
113 |
<p>We recommend trying both and see which one works better for your use case.</p>
|
114 |
""", elem_classes=["task-dropdown-info"])
|
115 |
demo.css = """
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
.task-dropdown-info {
|
117 |
padding: 0 16px;
|
118 |
font-size: 12px;
|
|
|
105 |
# Update file_types to accept PDF as well as common image formats.
|
106 |
pdf_input = gr.File(label="π Upload Image file or PDF file", file_types=[".pdf", ".png", ".jpg", ".jpeg"])
|
107 |
|
108 |
+
with gr.Group(elem_classes=["task-background"]):
|
109 |
task_dropdown = gr.Radio(["default", "structure"], label="π― Select Task", value="default")
|
110 |
gr.HTML("""
|
111 |
<p><b>default</b>: This mode works for most cases and is recommended for files without a clear template such as infographics.</p>
|
112 |
+
<p><b>structure</b>: This mode offers improved performance for structured documents such as complex documents with images / tables.</p>
|
113 |
<p>We recommend trying both and see which one works better for your use case.</p>
|
114 |
""", elem_classes=["task-dropdown-info"])
|
115 |
demo.css = """
|
116 |
+
.task-background {
|
117 |
+
background: var(--block-background-fill) !important;
|
118 |
+
|
119 |
+
}
|
120 |
+
.task-background > * {
|
121 |
+
background: var(--block-background-fill) !important;
|
122 |
+
}
|
123 |
.task-dropdown-info {
|
124 |
padding: 0 16px;
|
125 |
font-size: 12px;
|