asquirous commited on
Commit
641fe93
1 Parent(s): 7b915a5

Import torch and add as requirement

Browse files
Files changed (2) hide show
  1. app.py +2 -1
  2. requirements.txt +1 -0
app.py CHANGED
@@ -1,4 +1,5 @@
1
  from fastai.vision.all import *
 
2
  import gradio as gr
3
 
4
  learn = load_learner("model_tvdesktop.pkl")
@@ -11,7 +12,7 @@ def classify_image(img):
11
  print(probs[0]*100)
12
  for out in output:
13
  val = output[out]
14
- if val < 60:
15
  return {"Not Sure/Others": 0}
16
  return output
17
 
 
1
  from fastai.vision.all import *
2
+ import torch
3
  import gradio as gr
4
 
5
  learn = load_learner("model_tvdesktop.pkl")
 
12
  print(probs[0]*100)
13
  for out in output:
14
  val = output[out]
15
+ if val.item()*100 < 60:
16
  return {"Not Sure/Others": 0}
17
  return output
18
 
requirements.txt CHANGED
@@ -1 +1,2 @@
1
  fastai
 
 
1
  fastai
2
+ torch