Andreas-w commited on
Commit
a0b97c1
·
1 Parent(s): 908e5dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
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
- learn.load('stage-1')
11
- predictions = model.predict(img_array)
 
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