Spaces:
Runtime error
Runtime error
File size: 710 Bytes
c7b8d1d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
import gradio as gr
def generate_predictions(image_input, text_input):
return image_input
with gr.Blocks(title="Kosmos-2", theme=gr.themes.Base()).queue() as demo:
with gr.Row():
with gr.Column():
image_input = gr.Image(type="pil", label="Test Image")
run_button = gr.Button(label="Run", visible=True)
with gr.Column():
image_output = gr.Image(type="pil")
with gr.Row():
with gr.Column():
gr.Examples(examples=[
["cheetah.jpg"],
], inputs=[image_input]
)
run_button.click(fn=generate_predictions,
inputs=[image_input],
outputs=[image_output],
)
demo.launch() |