File size: 426 Bytes
a4c2fe3
 
a0b97c1
 
a4c2fe3
 
 
 
 
 
a0b97c1
 
 
908e5dc
 
 
a4c2fe3
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import numpy as np
import gradio as gr
import torch
import torchvision

def funksjon(input_img):
    
    #Må inporterer modellen fra API på huggingface.co 

    #imgPred = model.fit(input_img)
    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()