Spaces:
Runtime error
Runtime error
Modifying the UI
Browse files- src/ui/ui.py +5 -40
src/ui/ui.py
CHANGED
|
@@ -144,10 +144,10 @@ def create_ui():
|
|
| 144 |
with gr.Blocks(css="""
|
| 145 |
/* Simple output container with only one scrollbar */
|
| 146 |
.output-container {
|
| 147 |
-
max-height: 420px;
|
| 148 |
overflow-y: auto;
|
| 149 |
-
border: 1px solid #ddd;
|
| 150 |
-
padding: 10px;
|
| 151 |
}
|
| 152 |
|
| 153 |
/* Hide any scrollbars from parent containers */
|
|
@@ -167,44 +167,9 @@ def create_ui():
|
|
| 167 |
margin-top: 15px;
|
| 168 |
margin-bottom: 15px;
|
| 169 |
}
|
| 170 |
-
|
| 171 |
-
/* Style the app title */
|
| 172 |
-
.app-title {
|
| 173 |
-
text-align: center;
|
| 174 |
-
margin-bottom: 2px;
|
| 175 |
-
border-bottom: 1px solid #0B0B0D;
|
| 176 |
-
padding-bottom: 4px;
|
| 177 |
-
}
|
| 178 |
-
|
| 179 |
-
/* Info section */
|
| 180 |
-
.info-section {
|
| 181 |
-
background-color: #f8f9fa;
|
| 182 |
-
padding: 10px;
|
| 183 |
-
border-radius: 5px;
|
| 184 |
-
margin-bottom: 15px;
|
| 185 |
-
font-size: 14px;
|
| 186 |
-
}
|
| 187 |
""") as demo:
|
| 188 |
-
#
|
| 189 |
-
gr.
|
| 190 |
-
"""
|
| 191 |
-
<div class="app-title">
|
| 192 |
-
<h1>Document to Markdown Converter</h1>
|
| 193 |
-
<p>Convert documents to markdown format using various parsers including MarkItDown</p>
|
| 194 |
-
</div>
|
| 195 |
-
"""
|
| 196 |
-
)
|
| 197 |
-
|
| 198 |
-
# Add MarkItDown info block if it's available
|
| 199 |
-
if HAS_MARKITDOWN:
|
| 200 |
-
gr.HTML(
|
| 201 |
-
"""
|
| 202 |
-
<div class="info-section">
|
| 203 |
-
<strong>MarkItDown is available!</strong> Use it to convert various file formats
|
| 204 |
-
including PDF, Office documents, images, and more to Markdown format.
|
| 205 |
-
</div>
|
| 206 |
-
"""
|
| 207 |
-
)
|
| 208 |
|
| 209 |
# State to track if cancellation is requested
|
| 210 |
cancel_requested = gr.State(False)
|
|
|
|
| 144 |
with gr.Blocks(css="""
|
| 145 |
/* Simple output container with only one scrollbar */
|
| 146 |
.output-container {
|
| 147 |
+
max-height: 420px;
|
| 148 |
overflow-y: auto;
|
| 149 |
+
border: 1px solid #ddd;
|
| 150 |
+
padding: 10px;
|
| 151 |
}
|
| 152 |
|
| 153 |
/* Hide any scrollbars from parent containers */
|
|
|
|
| 167 |
margin-top: 15px;
|
| 168 |
margin-bottom: 15px;
|
| 169 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 170 |
""") as demo:
|
| 171 |
+
# Simple title - no fancy HTML or CSS
|
| 172 |
+
gr.Markdown("## Markit: Document to Markdown Converter")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
|
| 174 |
# State to track if cancellation is requested
|
| 175 |
cancel_requested = gr.State(False)
|