Spaces:
Runtime error
Runtime error
| 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) | |