Spaces:
Runtime error
Runtime error
from UNet import * | |
from make_predictions import * | |
import torch | |
import gradio as gr | |
def getoutput(input_img): | |
unet = UNet().to('cpu') | |
unet = torch.load("unet_06_07_2022_22_43_42_1024_1024.pth", map_location='cpu').to('cpu') | |
output_img = make_predictions(unet, input_img, threshold=0.05) | |
return output_img | |
demo = gr.Interface(getoutput, gr.Image(shape=(200, 200)), "image") | |
demo.launch() |