NoName commited on
Commit
77e4300
1 Parent(s): a12fe9e

Add application file

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -1,9 +1,9 @@
1
  import gradio as gr
2
  from fastai.vision.all import *
3
 
4
- import pathlib
5
- temp = pathlib.PosixPath
6
- pathlib.PosixPath = pathlib.WindowsPath
7
 
8
  catergories = ('bunny girl', 'cat neko girl', 'fox kitsune girl', 'wolfgirl')
9
 
@@ -13,7 +13,7 @@ def load_model_and_predict(img):
13
  #return pred, probs
14
  return dict(zip(catergories, map(float,probs)))
15
 
16
- model_path = "export_resnet101_e7_2.pkl"
17
  learn = load_learner(model_path)
18
 
19
  image = gr.inputs.Image(shape=(224, 224))
 
1
  import gradio as gr
2
  from fastai.vision.all import *
3
 
4
+ #import pathlib
5
+ #temp = pathlib.PosixPath
6
+ #pathlib.PosixPath = pathlib.WindowsPath
7
 
8
  catergories = ('bunny girl', 'cat neko girl', 'fox kitsune girl', 'wolfgirl')
9
 
 
13
  #return pred, probs
14
  return dict(zip(catergories, map(float,probs)))
15
 
16
+ model_path = "export_resnet18_e12_3.pkl"
17
  learn = load_learner(model_path)
18
 
19
  image = gr.inputs.Image(shape=(224, 224))