File size: 544 Bytes
725f958
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
30
import torch
import gradio as gr

MARKDOWN = """
# EfficientSAM sv. SAM
"""

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")


def inference(image):
    return image


with gr.Blocks() as demo:
    gr.Markdown(MARKDOWN)
    with gr.Row():
        input_image = gr.Image()
        output_image = gr.Image()
    with gr.Row():
        submit_button = gr.Button("Submit")

    submit_button.click(
        inference,
        inputs=[input_image],
        outputs=output_image
    )

demo.launch(debug=False, show_error=True)