Spaces:
Runtime error
Runtime error
import numpy as np | |
import gradio as gr | |
def getoutput(input_img): | |
unet = UNet().to(device) | |
unet = torch.load("unet_06_07_2022_17_13_42_256_256.pth").to(device) | |
output_img = make_predictions(unet, input_img, threshold=0.5) | |
return output_img | |
demo = gr.Interface(getoutput, gr.Image(shape=(200, 200)), "image") | |
demo.launch(share=True) |