Andreas-w's picture
Update app.py
da1fd41
raw
history blame
513 Bytes
import numpy as np
import gradio as gr
import torch as torch
import torchvision
import load_model from "./metode"
def funksjon(input_img):
#Må inporterer modellen fra API på huggingface.co
#imgPred = model.fit(input_img)
model = load_model('stage-1.pth')
#model = torch.load('stage-1.pth')
predictions = model.predict(input_img)
#imgPred = input_img
return predictions
demo = gr.Interface(funksjon, gr.Image(), "image")
#demo.launch(share=True)
demo.launch()