Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

Spaces:
ECOSORT
/
README
Configuration error

App Files Files Community
1
Fetching metadata from the HF Docker repository...
New discussion
Resources
  • PR & discussions documentation
  • Code of Conduct
  • Hub documentation

import gradio as gr from PIL import Image import random # ------------------------------- # Classification logic # ------------------------------- def classify_item(image, description): categories = ["Recyclable", "Compostable", "Trash", "Harmful"] if description: desc = description.lower() # Compostable: fruits & vegetables if "banana" in desc or "apple" in desc or "fruit" in desc or "vegetable" in desc or "food" in desc or "peel" in desc or "leaf" in desc: category = "Compostable" # Harmful: medical + batteries elif "syringe" in desc or "needle" in desc or "battery" in desc or

🔥 1
#1 opened 6 months ago by
vlithish
Company
TOS Privacy About Careers
Website
Models Datasets Spaces Pricing Docs