update
This commit is contained in:
parent
06878c2999
commit
bb87fc8450
|
@ -28,19 +28,33 @@ def inference(img):
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
title = "object detection:table-transformer-detection"
|
#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."
|
#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>"
|
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']]
|
examples=[['example_pdf.png']]
|
||||||
|
|
||||||
|
|
||||||
demo = gr.Interface(
|
with gr.Blocks() as demo:
|
||||||
fn=inference,
|
gr.Markdown(
|
||||||
inputs=[gr.inputs.Image(type="pil")],
|
"""
|
||||||
outputs=gr.outputs.Textbox(),
|
# object detection:table-transformer-detection
|
||||||
title=title,
|
Gradio Demo for table-transformer-detection. To use it, simply upload your image, or click one of the examples to load them.
|
||||||
description=description,
|
""")
|
||||||
article=article,
|
with gr.Row():
|
||||||
examples=examples)
|
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()
|
demo.launch()
|
Loading…
Reference in New Issue