Englios commited on
Commit
8021f89
1 Parent(s): a89e742

Fix app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,7 +8,7 @@ def gety(r):return r['cat'].split(' ')
8
 
9
  import pathlib
10
  posix_backup = pathlib.PosixPath
11
- model_path = Path('./model.pkl')
12
  try:
13
  pathlib.PosixPath = pathlib.WindowsPath
14
  learn = load_learner(model_path)
@@ -24,7 +24,7 @@ def classify_image(img):
24
 
25
  image = gr.Image(sources="upload")
26
  label = gr.Label()
27
- examples = ['./black.jpg','./brown.jpg','./grizzly.jpeg','./toy.jpeg','./white.jpg']
28
 
29
  intf = gr.Interface(fn=classify_image,inputs=image,outputs=label,examples=examples)
30
  intf.launch(inline=False,share=True)
 
8
 
9
  import pathlib
10
  posix_backup = pathlib.PosixPath
11
+ model_path = Path('model.pkl')
12
  try:
13
  pathlib.PosixPath = pathlib.WindowsPath
14
  learn = load_learner(model_path)
 
24
 
25
  image = gr.Image(sources="upload")
26
  label = gr.Label()
27
+ examples = ['black.jpg','brown.jpg','grizzly.jpeg','toy.jpeg','white.jpg']
28
 
29
  intf = gr.Interface(fn=classify_image,inputs=image,outputs=label,examples=examples)
30
  intf.launch(inline=False,share=True)