aashi-pandey commited on
Commit
b44c0bd
·
2 Parent(s): 6946ba06b8552a

Merge branch 'main' of https://huggingface.co/spaces/aashi-pandey/testingmyspace

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -2,7 +2,8 @@
2
  import gradio as gr
3
  import skimage
4
  from fastai.vision.all import *
5
- learn = load_learner('export.pkl')
 
6
  labels = learn.dls.vocab
7
  def predict(img):
8
  img = PILImage.create(img)
@@ -16,6 +17,9 @@ article="<p style='text-align: center'><a href='https://tmabraham.github.io/blog
16
  examples = ['siamese.jpg']
17
  interpretation='default'
18
  enable_queue=True
19
- gr.interface(
20
- fn=predict,inputs=gr.inputs.Image(shape=(512, 512)),outputs=gr.outputs.Label(num_top_classes=3),title=title,description=description,article=article,examples=examples,interpretation=interpretation,enable_queue=enable_queue).launch()
21
- .
 
 
 
 
2
  import gradio as gr
3
  import skimage
4
  from fastai.vision.all import *
5
+ def is_cat(x): return x[0].isupper()
6
+ learn = load_learner('model.pkl')
7
  labels = learn.dls.vocab
8
  def predict(img):
9
  img = PILImage.create(img)
 
17
  examples = ['siamese.jpg']
18
  interpretation='default'
19
  enable_queue=True
20
+ gr.interface(fn=predict,inputs=gr.inputs.Image(shape=(512,512)), outputs=gr.outputs.Label(num_top_classes=3),title=title,
21
+ description=description,
22
+ article=article,
23
+ examples=examples,
24
+ interpretation=interpretation,
25
+ enable_queue=enable_queue).launch()