Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,14 +1,16 @@
|
|
| 1 |
import numpy as np
|
| 2 |
import gradio as gr
|
| 3 |
-
|
|
|
|
| 4 |
|
| 5 |
def funksjon(input_img):
|
| 6 |
|
| 7 |
#Må inporterer modellen fra API på huggingface.co
|
| 8 |
|
| 9 |
#imgPred = model.fit(input_img)
|
| 10 |
-
|
| 11 |
-
|
|
|
|
| 12 |
#imgPred = input_img
|
| 13 |
|
| 14 |
return predictions
|
|
|
|
| 1 |
import numpy as np
|
| 2 |
import gradio as gr
|
| 3 |
+
import torch
|
| 4 |
+
import torchvision
|
| 5 |
|
| 6 |
def funksjon(input_img):
|
| 7 |
|
| 8 |
#Må inporterer modellen fra API på huggingface.co
|
| 9 |
|
| 10 |
#imgPred = model.fit(input_img)
|
| 11 |
+
model = torch.load('stage-1.pth')
|
| 12 |
+
|
| 13 |
+
predictions = model.predict(input_img)
|
| 14 |
#imgPred = input_img
|
| 15 |
|
| 16 |
return predictions
|