shivambhosale's picture
Create new file
0211f21
raw
history blame
350 Bytes
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)