devudilip commited on
Commit
adfc461
·
verified ·
1 Parent(s): 0515ae8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -21
app.py CHANGED
@@ -4,7 +4,7 @@ import dill
4
 
5
  def is_cat(x): return x[0].isupper()
6
 
7
- learn = load_learner('model.pkl', pickle_module=dill)
8
 
9
 
10
  categories = ('Dog', 'Cat')
@@ -20,23 +20,3 @@ examples = ['siamese.png']
20
 
21
  intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
22
  intf.launch()
23
-
24
-
25
- # labels = learn.dls.vocab
26
-
27
-
28
-
29
- # title = "Pet Breed Classifier"
30
- # description = "A pet breed classifier trained on the Oxford Pets dataset with fastai. Created as a demo for Gradio and HuggingFace Spaces."
31
- # article = "<p style='text-align: center'><a href='https://tmabraham.github.io/blog/gradio_hf_spaces_tutorial' target='_blank'>Blog post</a></p>"
32
-
33
-
34
- # gr.Interface(
35
- # fn=predict,
36
- # inputs=gr.Image(shape=(512, 512)), # Updated to newer Gradio syntax
37
- # outputs=gr.Label(num_top_classes=3), # Updated to newer Gradio syntax
38
- # title=title,
39
- # description=description,
40
- # article=article,
41
- # examples=examples
42
- # ).launch()
 
4
 
5
  def is_cat(x): return x[0].isupper()
6
 
7
+ learn = load_learner('model.pkl')
8
 
9
 
10
  categories = ('Dog', 'Cat')
 
20
 
21
  intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
22
  intf.launch()