KennethTM commited on
Commit
a971389
1 Parent(s): 458a44d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -101,7 +101,7 @@ with gr.Blocks() as demo:
101
  gr.Markdown("# Table recognition")
102
  gr.Markdown("This model ([KennethTM/pix2struct-base-table2html](https://huggingface.co/KennethTM/pix2struct-base-table2html)) converts an image of a table to HTML format and is finetuned from [Pix2Struct base model](https://huggingface.co/google/pix2struct-base).")
103
  gr.Markdown("The model expects an image containing only a table. If the table is embedded in a document, first use the detection model in the 'Detection' tab.")
104
- gr.Markdown("*note that recognition model inference is slow on cpu, please be patient*")
105
  with gr.Row():
106
  with gr.Column():
107
  input_table = gr.Image(type="pil", label="Table", show_label=True, scale=1)
@@ -114,7 +114,7 @@ with gr.Blocks() as demo:
114
  download_csv = gr.DownloadButton(visible=False)
115
 
116
  with gr.Row():
117
- examples = gr.Examples(demo_recognition, input_table, cache_examples=False, label="Example tables ([MMTab](https://huggingface.co/datasets/SpursgoZmy/MMTab))")
118
 
119
  input_table.change(fn=table_recognition_outputs, inputs=input_table, outputs=[output_html, download_html, download_csv])
120
 
@@ -130,7 +130,7 @@ with gr.Blocks() as demo:
130
  output_gallery = gr.Gallery(type="pil", label="Tables", show_label=True, scale=1, format="png")
131
 
132
  with gr.Row():
133
- examples = gr.Examples(demo_detection, input_image, cache_examples=False, label="Example documents ([PubTabNet](https://huggingface.co/datasets/apoidea/pubtabnet-html))")
134
 
135
  input_image.change(fn=table_detection, inputs=input_image, outputs=output_gallery)
136
 
 
101
  gr.Markdown("# Table recognition")
102
  gr.Markdown("This model ([KennethTM/pix2struct-base-table2html](https://huggingface.co/KennethTM/pix2struct-base-table2html)) converts an image of a table to HTML format and is finetuned from [Pix2Struct base model](https://huggingface.co/google/pix2struct-base).")
103
  gr.Markdown("The model expects an image containing only a table. If the table is embedded in a document, first use the detection model in the 'Detection' tab.")
104
+ gr.Markdown("*Note that recognition model inference is slow on CPU (a few minutes), please be patient*")
105
  with gr.Row():
106
  with gr.Column():
107
  input_table = gr.Image(type="pil", label="Table", show_label=True, scale=1)
 
114
  download_csv = gr.DownloadButton(visible=False)
115
 
116
  with gr.Row():
117
+ examples = gr.Examples(demo_recognition, input_table, cache_examples=False, label="Example tables (MMTab dataset)")
118
 
119
  input_table.change(fn=table_recognition_outputs, inputs=input_table, outputs=[output_html, download_html, download_csv])
120
 
 
130
  output_gallery = gr.Gallery(type="pil", label="Tables", show_label=True, scale=1, format="png")
131
 
132
  with gr.Row():
133
+ examples = gr.Examples(demo_detection, input_image, cache_examples=False, label="Example documents (PubTabNet dataset)")
134
 
135
  input_image.change(fn=table_detection, inputs=input_image, outputs=output_gallery)
136