devseek commited on
Commit
48ed32b
·
1 Parent(s): bf22d26

modified requirements.txt

Browse files
Files changed (2) hide show
  1. app.py +2 -2
  2. requirements.txt +1 -1
app.py CHANGED
@@ -4,14 +4,14 @@ from fastai.vision.widgets import *
4
  import timm
5
  import gradio as gr
6
  categories = ('accident' , 'non-accident')
7
- learn = load_learner('/content/model.pkl')
8
  def classify(img):
9
  img = img.resize(224)
10
  categories,index,probs = learn.predict(img)
11
  return dict(zip(categories , map(float,probs)))
12
  img = gr.inputs.Image(shape=(224))
13
  label = gr.outputs.Label()
14
- example = ['/content/accident.jpg' , '/content/non-accident.jpg']
15
 
16
  iface = gr.Interface(fn=classify, inputs="image", outputs="label" , examples= example)
17
  iface.launch()
 
4
  import timm
5
  import gradio as gr
6
  categories = ('accident' , 'non-accident')
7
+ learn = load_learner('model.pkl')
8
  def classify(img):
9
  img = img.resize(224)
10
  categories,index,probs = learn.predict(img)
11
  return dict(zip(categories , map(float,probs)))
12
  img = gr.inputs.Image(shape=(224))
13
  label = gr.outputs.Label()
14
+ example = ['accident.jpg' , 'non-accident.jpg']
15
 
16
  iface = gr.Interface(fn=classify, inputs="image", outputs="label" , examples= example)
17
  iface.launch()
requirements.txt CHANGED
@@ -1,3 +1,3 @@
1
- -Uqq fastbook
2
  fastai
3
  timm
 
1
+ fastbook
2
  fastai
3
  timm