Bhavya Giri commited on
Commit
7f48409
·
1 Parent(s): 418cb16
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -6,8 +6,11 @@ learn = load_learner(path/"model.pkl")
6
  def classify_garbage(img):
7
  pred,idx,probs = learn.predict(img)
8
  return(dict(zip(pred,map(float,probs))))
 
9
  image = gr.inputs.Image(shape = (224,224))
10
  label = gr.outputs.Label()
11
-
12
- iface = gr.Interface(fn=classify_garbage, inputs=image, outputs=label)
 
 
13
  iface.launch(inline=False)
 
6
  def classify_garbage(img):
7
  pred,idx,probs = learn.predict(img)
8
  return(dict(zip(pred,map(float,probs))))
9
+
10
  image = gr.inputs.Image(shape = (224,224))
11
  label = gr.outputs.Label()
12
+ title = "Garbage Classifier"
13
+ description = "A Garbage classifier trained with fastai. Created as a demo for Gradio and HuggingFace Spaces."
14
+ examples = ['paper24.jpg']
15
+ iface = gr.Interface(fn=classify_garbage, inputs=image, outputs=label,examples=examples,title=title,description=description)
16
  iface.launch(inline=False)