Vikranth commited on
Commit
3c9c18e
·
1 Parent(s): d3bffe5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -15
app.py CHANGED
@@ -63,32 +63,27 @@ def classify_image(input):
63
  predicted_class = categories[np.argmax(preds)]
64
  recycle_preds = dict_recycle[predicted_class]
65
 
66
- return cls_preds, recycle_preds
67
 
68
 
69
 
70
  # Defining the Gradio Interface
71
  # This is how the Demo will look like.
72
  title = "Should I Recycle This?"
73
- description = """
74
 
75
- This app was created to help people recycle the right type of waste.
76
 
77
- You can use it at the comfort of your own home. Just take a picture of the waste material you want to know if
78
- its recyclible and upload it to this app and using Artificial Intelligence it will determine if you should
79
- throw the waste in the recycling bin or the normal bin.
80
 
81
- Enjoy!
82
-
83
- Made by Viola, you can reach out to me here: <a href="[email protected]">Send Email</a>
84
-
85
-
86
- """
87
 
88
  image = gr.Image(shape=(224,224))
89
  label = gr.Label(num_top_classes=3, label='Prediction Material')
90
- recycle = gr.Textbox(label='Should you recycle?')
91
- outputs = [label, recycle]
92
- intf = gr.Interface(fn=classify_image, inputs=image, outputs=outputs, title = title, description = description,
93
  cache_examples=False)
94
  intf.launch(enable_queue=True)
 
63
  predicted_class = categories[np.argmax(preds)]
64
  recycle_preds = dict_recycle[predicted_class]
65
 
66
+ return cls_preds
67
 
68
 
69
 
70
  # Defining the Gradio Interface
71
  # This is how the Demo will look like.
72
  title = "Should I Recycle This?"
73
+ # description = """
74
 
75
+ # This app was created to help people recycle the right type of waste.
76
 
77
+ # You can use it at the comfort of your own home. Just take a picture of the waste material you want to know if
78
+ # its recyclible and upload it to this app and using Artificial Intelligence it will determine if you should
79
+ # throw the waste in the recycling bin or the normal bin.
80
 
81
+ # """
 
 
 
 
 
82
 
83
  image = gr.Image(shape=(224,224))
84
  label = gr.Label(num_top_classes=3, label='Prediction Material')
85
+ #recycle = gr.Textbox(label='Should you recycle?')
86
+ outputs = [label]
87
+ intf = gr.Interface(fn=classify_image, inputs=image, outputs=outputs, title = title,
88
  cache_examples=False)
89
  intf.launch(enable_queue=True)