bobalbrecht commited on
Commit
f93a188
·
1 Parent(s): 47031ed

added model

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -20,7 +20,9 @@ categories = (
20
 
21
  image = gr.inputs.Image(shape=(192,192))
22
  label = gr.outputs.Label()
 
23
  image_path = Path('images')
 
24
  examples = [image_path / f"{c}.jpg" for c in categories]
25
 
26
  def classify_image(img):
@@ -31,6 +33,6 @@ def classify_image(img):
31
  iface = gr.Interface(fn=classify_image, inputs=image, outputs=label,
32
  examples=examples)
33
 
34
- # iface.launch()
35
 
36
 
 
20
 
21
  image = gr.inputs.Image(shape=(192,192))
22
  label = gr.outputs.Label()
23
+ model_path = Path('models')
24
  image_path = Path('images')
25
+ learn = load_learner(model_path/'cloudmodel.pk1')
26
  examples = [image_path / f"{c}.jpg" for c in categories]
27
 
28
  def classify_image(img):
 
33
  iface = gr.Interface(fn=classify_image, inputs=image, outputs=label,
34
  examples=examples)
35
 
36
+ iface.launch()
37
 
38