NDugar commited on
Commit
50e1bb0
1 Parent(s): 502d514

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -24,8 +24,8 @@ from fastai.learner import load_learner
24
 
25
  model = torch.load("h2z-85epoch.pth",map_location=torch.device('cpu'))
26
  def generate_img(img):
27
- prediction = model(img, training=False)
28
- return prediction
29
 
30
 
31
  image = gr.inputs.Image(type="numpy")
 
24
 
25
  model = torch.load("h2z-85epoch.pth",map_location=torch.device('cpu'))
26
  def generate_img(img):
27
+ _,_,preds = learn.get_preds(dl=[b], with_decoded=True)
28
+ return preds
29
 
30
 
31
  image = gr.inputs.Image(type="numpy")