Spaces:
Running
on
Zero
Running
on
Zero
Remove labels from text section
Browse files
app.py
CHANGED
|
@@ -156,8 +156,8 @@ def process_image(image, mode, task, custom_prompt):
|
|
| 156 |
if not result:
|
| 157 |
return "No text", "", "", None, []
|
| 158 |
|
| 159 |
-
cleaned = clean_output(result, False,
|
| 160 |
-
markdown = clean_output(result, True, True)
|
| 161 |
|
| 162 |
img_out = None
|
| 163 |
crops = []
|
|
@@ -251,15 +251,15 @@ with gr.Blocks(theme=gr.themes.Soft(), title="DeepSeek-OCR") as demo:
|
|
| 251 |
|
| 252 |
with gr.Column(scale=2):
|
| 253 |
with gr.Tabs():
|
| 254 |
-
with gr.Tab("
|
| 255 |
text_out = gr.Textbox(lines=20, show_copy_button=True, show_label=False)
|
| 256 |
-
with gr.Tab("
|
| 257 |
md_out = gr.Markdown("")
|
| 258 |
-
with gr.Tab("
|
| 259 |
img_out = gr.Image(type="pil", height=500, show_label=False)
|
| 260 |
-
with gr.Tab("
|
| 261 |
gallery = gr.Gallery(show_label=False, columns=3, height=400)
|
| 262 |
-
with gr.Tab("
|
| 263 |
raw_out = gr.Textbox(lines=20, show_copy_button=True, show_label=False)
|
| 264 |
|
| 265 |
gr.Examples(
|
|
|
|
| 156 |
if not result:
|
| 157 |
return "No text", "", "", None, []
|
| 158 |
|
| 159 |
+
cleaned = clean_output(result, include_images=False, remove_labels=True)
|
| 160 |
+
markdown = clean_output(result, include_images=True, remove_labels=True)
|
| 161 |
|
| 162 |
img_out = None
|
| 163 |
crops = []
|
|
|
|
| 251 |
|
| 252 |
with gr.Column(scale=2):
|
| 253 |
with gr.Tabs():
|
| 254 |
+
with gr.Tab("Text"):
|
| 255 |
text_out = gr.Textbox(lines=20, show_copy_button=True, show_label=False)
|
| 256 |
+
with gr.Tab("Markdown"):
|
| 257 |
md_out = gr.Markdown("")
|
| 258 |
+
with gr.Tab("Boxes"):
|
| 259 |
img_out = gr.Image(type="pil", height=500, show_label=False)
|
| 260 |
+
with gr.Tab("Cropped Images"):
|
| 261 |
gallery = gr.Gallery(show_label=False, columns=3, height=400)
|
| 262 |
+
with gr.Tab("Raw Text"):
|
| 263 |
raw_out = gr.Textbox(lines=20, show_copy_button=True, show_label=False)
|
| 264 |
|
| 265 |
gr.Examples(
|