raw output tab
Browse files
app.py
CHANGED
|
@@ -733,6 +733,8 @@ def create_gradio_interface():
|
|
| 733 |
interactive=False,
|
| 734 |
height=500
|
| 735 |
)
|
|
|
|
|
|
|
| 736 |
# Markdown output tab
|
| 737 |
with gr.Tab("📝 Extracted Content"):
|
| 738 |
markdown_output = gr.Markdown(
|
|
@@ -796,6 +798,7 @@ def create_gradio_interface():
|
|
| 796 |
|
| 797 |
return (
|
| 798 |
first_result['processed_image'],
|
|
|
|
| 799 |
markdown_update,
|
| 800 |
first_result['layout_result']
|
| 801 |
)
|
|
@@ -821,6 +824,7 @@ def create_gradio_interface():
|
|
| 821 |
|
| 822 |
return (
|
| 823 |
result['processed_image'],
|
|
|
|
| 824 |
markdown_update,
|
| 825 |
result['layout_result']
|
| 826 |
)
|
|
@@ -883,7 +887,7 @@ def create_gradio_interface():
|
|
| 883 |
process_btn.click(
|
| 884 |
process_document,
|
| 885 |
inputs=[file_input, max_new_tokens, min_pixels, max_pixels, custom_prompt],
|
| 886 |
-
outputs=[processed_image, markdown_output, json_output]
|
| 887 |
)
|
| 888 |
|
| 889 |
# The outputs list for the clear button is now correct
|
|
|
|
| 733 |
interactive=False,
|
| 734 |
height=500
|
| 735 |
)
|
| 736 |
+
with gr.Tab("Raw Output"):
|
| 737 |
+
raw_output_box = gr.Textbox( label="Raw Model Output", lines=20, interactive=False, value="" )
|
| 738 |
# Markdown output tab
|
| 739 |
with gr.Tab("📝 Extracted Content"):
|
| 740 |
markdown_output = gr.Markdown(
|
|
|
|
| 798 |
|
| 799 |
return (
|
| 800 |
first_result['processed_image'],
|
| 801 |
+
first_result['raw_output'],
|
| 802 |
markdown_update,
|
| 803 |
first_result['layout_result']
|
| 804 |
)
|
|
|
|
| 824 |
|
| 825 |
return (
|
| 826 |
result['processed_image'],
|
| 827 |
+
first_result['raw_output'],
|
| 828 |
markdown_update,
|
| 829 |
result['layout_result']
|
| 830 |
)
|
|
|
|
| 887 |
process_btn.click(
|
| 888 |
process_document,
|
| 889 |
inputs=[file_input, max_new_tokens, min_pixels, max_pixels, custom_prompt],
|
| 890 |
+
outputs=[processed_image, raw_output_box, markdown_output, json_output]
|
| 891 |
)
|
| 892 |
|
| 893 |
# The outputs list for the clear button is now correct
|