jrnold commited on
Commit
cbf3da8
1 Parent(s): bdff6f4
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -11,7 +11,7 @@ def is_cat(x) -> bool:
11
 
12
  learn = load_learner("model.pkl")
13
 
14
- categories = ("Dog", "Cat")
15
 
16
  def classify_image(img):
17
  _, _, probs = learn.predict(img)
@@ -21,4 +21,4 @@ image = gr.inputs.Image(shape=(192, 192))
21
  label = gr.outputs.Label()
22
  examples = [str(x) for x in Path("examples").iterdir()]
23
  intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
24
- intf.launch(inline=True)
 
11
 
12
  learn = load_learner("model.pkl")
13
 
14
+ categories = learn.dls.vocab
15
 
16
  def classify_image(img):
17
  _, _, probs = learn.predict(img)
 
21
  label = gr.outputs.Label()
22
  examples = [str(x) for x in Path("examples").iterdir()]
23
  intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
24
+ intf.launch()