Spaces:
Running
Running
Commit History
-
Create requirements.txt Running
Verified signature725bc45 -
Update app.py
Verified signature4372096 -
Update app.py
Verified signaturea707f72
-
Update app.py
Verified signaturece2f93e -
Update app.py
Verified signaturec0795c6 -
Update app.py
Verified signaturee327f54 -
Update app.py
Verified signature7345cdf -
Update app.py
Verified signature6dd53f5 -
Delete bins
Verified signature9968618 -
Update bins
Verified signature   5818608 -
Update bins
Verified signature  428e84e -
Update app.py
Verified signatured0770f2 -
Create bins/
Verified signature   189441e -
gradio
Verified signature   8e684ad -
gradio
Verified signature   04d7307 -
gradio
Verified signature   c33843a -
Create app.py
Verified signature   7cf723c -
GRADIO
Verified signatureb370247 -
gradio
Verified signature6f5f080 -
import gradio as gr # Waste classification function def classify_waste(item): item = item.lower() if any(word in item for word in ["paper", "plastic", "glass", "bottle", "metal", "tin", "cardboard"]): return "♻️ Recyclable - Please place in the recycling bin." elif any(word in item for word in ["fruit", "vegetable", "food", "banana", "apple", "peel", "veg"]): return "🌱 Compostable - Add it to compost or organic waste bin." elif any(word in item for word in ["syringe", "battery", "medicine", "chemical", "paint"]): return "⚠️ Harmful/Decomposable - Dispose at hazardous waste collection." else: return "🗑️ Trash - Dispose in general waste bin." # Gradio Interface iface = gr.Interface( fn=classify_waste, inputs=gr.Textbox(label="Enter item description"), outputs=gr.Textbox(label="Classification"), title="EcoSort ♻️", description="Type the name of a waste item (e.g., 'banana peel', 'plastic bottle', 'battery') and get eco-friendly disposal advice." ) # Run app if __name__ == "__main__": iface.launch()
Verified signature083d24e -
initial commit
Verified signature92f23b0