Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -324,6 +324,10 @@ css = """
|
|
324 |
.submit-btn:hover {
|
325 |
background-color: #3498db !important;
|
326 |
}
|
|
|
|
|
|
|
|
|
327 |
"""
|
328 |
|
329 |
# Create the Gradio Interface
|
@@ -354,8 +358,13 @@ with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
|
|
354 |
top_p = gr.Slider(label="Top-p (nucleus sampling)", minimum=0.05, maximum=1.0, step=0.05, value=0.9)
|
355 |
top_k = gr.Slider(label="Top-k", minimum=1, maximum=1000, step=1, value=50)
|
356 |
repetition_penalty = gr.Slider(label="Repetition penalty", minimum=1.0, maximum=2.0, step=0.05, value=1.2)
|
|
|
357 |
with gr.Column():
|
358 |
-
|
|
|
|
|
|
|
|
|
359 |
model_choice = gr.Radio(
|
360 |
choices=["Nanonets-OCR-s", "MonkeyOCR-Recognition", "SmolDocling-256M-preview", "Typhoon-OCR-7B"],
|
361 |
label="Select Model",
|
|
|
324 |
.submit-btn:hover {
|
325 |
background-color: #3498db !important;
|
326 |
}
|
327 |
+
.canvas-output {
|
328 |
+
border: 2px solid #4682B4;
|
329 |
+
border-radius: 10px;
|
330 |
+
padding: 20px;
|
331 |
"""
|
332 |
|
333 |
# Create the Gradio Interface
|
|
|
358 |
top_p = gr.Slider(label="Top-p (nucleus sampling)", minimum=0.05, maximum=1.0, step=0.05, value=0.9)
|
359 |
top_k = gr.Slider(label="Top-k", minimum=1, maximum=1000, step=1, value=50)
|
360 |
repetition_penalty = gr.Slider(label="Repetition penalty", minimum=1.0, maximum=2.0, step=0.05, value=1.2)
|
361 |
+
|
362 |
with gr.Column():
|
363 |
+
with gr.Column(elem_classes="canvas-output"):
|
364 |
+
gr.Markdown("## Result.Md")
|
365 |
+
output = gr.Textbox(label="Raw Output Stream", interactive=False, lines=2)
|
366 |
+
markdown_output = gr.Markdown(label="Formatted Result (Result.Md)")
|
367 |
+
|
368 |
model_choice = gr.Radio(
|
369 |
choices=["Nanonets-OCR-s", "MonkeyOCR-Recognition", "SmolDocling-256M-preview", "Typhoon-OCR-7B"],
|
370 |
label="Select Model",
|