kaydee's picture
Update app.py
ddc5285 verified
raw
history blame
No virus
866 Bytes
import warnings
warnings.filterwarnings("ignore")
import extract_info as ei
import glob
import gradio as gr
title = "Reciepts Information Extraction using LayoutLMv3 Model"
description = "Reciepts information extraction - Here we use Microsoft's LayoutLMv3 trained on WildReceipt Dataset to predict the keys and values. To use it, simply upload an image or use the example image below. Results will show up in a few seconds."
css = """.output_image, .input_image {height: 600px !important}"""
iface = gr.Interface(fn=ei.main,
inputs=gr.Image(type="pil"),
outputs=gr.Image(type="pil", label="annotated image"),
title=title,
description=description,
css=css,
analytics_enabled = True)
iface.launch(inline=False, share=True, debug=False)