update
This commit is contained in:
parent
06878c2999
commit
bb87fc8450
|
@ -28,19 +28,33 @@ def inference(img):
|
|||
)
|
||||
|
||||
|
||||
title = "object detection:table-transformer-detection"
|
||||
description = "Gradio Demo for table-transformer-detection. To use it, simply upload your image, or click one of the examples to load them."
|
||||
#title = "#object detection:table-transformer-detection"
|
||||
#description = "Gradio Demo for table-transformer-detection. To use it, simply upload your image, or click one of the examples to load them."
|
||||
article = "<p style='text-align: center'><a href='https://github.com/bryandlee/animegan2-pytorch' target='_blank'>Github Repo Pytorch</a></p> <center><img src='https://visitor-badge.glitch.me/badge?page_id=akhaliq_animegan' alt='visitor badge'></center></p>"
|
||||
examples=[['example_pdf.png']]
|
||||
|
||||
|
||||
demo = gr.Interface(
|
||||
fn=inference,
|
||||
inputs=[gr.inputs.Image(type="pil")],
|
||||
outputs=gr.outputs.Textbox(),
|
||||
title=title,
|
||||
description=description,
|
||||
article=article,
|
||||
examples=examples)
|
||||
with gr.Blocks() as demo:
|
||||
gr.Markdown(
|
||||
"""
|
||||
# object detection:table-transformer-detection
|
||||
Gradio Demo for table-transformer-detection. To use it, simply upload your image, or click one of the examples to load them.
|
||||
""")
|
||||
with gr.Row():
|
||||
image_input = gr.Image(type="pil")
|
||||
image_output = gr.Textbox()
|
||||
image_button = gr.Button("上传")
|
||||
image_button.click(inference, inputs=image_input, outputs=image_output)
|
||||
gr.Examples(examples,inputs=image_input)
|
||||
|
||||
# demo = gr.Interface(
|
||||
# fn=inference,
|
||||
# inputs=[gr.inputs.Image(type="pil")],
|
||||
# outputs=gr.outputs.Textbox(),
|
||||
# title=title,
|
||||
# description=description,
|
||||
# article=article,
|
||||
# examples=examples)
|
||||
|
||||
|
||||
demo.launch()
|
Loading…
Reference in New Issue