yasir-13001 commited on
Commit
e8f3f13
Β·
verified Β·
1 Parent(s): ed8cfa9

Update Readme

Browse files
Files changed (1) hide show
  1. README.md +80 -1
README.md CHANGED
@@ -1,3 +1,4 @@
 
1
  ---
2
  title: Trash Classifier
3
  emoji: πŸš€
@@ -11,4 +12,82 @@ license: mit
11
  short_description: Classify trash into 6 Categories with 90 percent accuracy
12
  ---
13
 
14
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
  ---
3
  title: Trash Classifier
4
  emoji: πŸš€
 
12
  short_description: Classify trash into 6 Categories with 90 percent accuracy
13
  ---
14
 
15
+ # 🧠 Trash Classifier - Smart Garbage Sorting AI
16
+
17
+ This model classifies waste images into one of six recyclable or non-recyclable categories:
18
+
19
+ - ♻️ Cardboard
20
+ - 🧴 Plastic
21
+ - πŸ“° Paper
22
+ - πŸͺ™ Metal
23
+ - 🍾 Glass
24
+ - πŸ—‘ Trash (non-recyclable)
25
+
26
+ ---
27
+
28
+ ## πŸš€ Try It Live
29
+
30
+ Upload an image of trash and the model will predict which category it belongs to.
31
+
32
+ ---
33
+
34
+ ## πŸ“‘ API Usage
35
+
36
+ Call this model programmatically using its REST API:
37
+
38
+ ### πŸ” Python Example (`requests`):
39
+
40
+ ```python
41
+ import requests
42
+
43
+ api_url = "https://yasir-13001-trash-classifier.hf.space/run/predict"
44
+ image_path = "example.jpg"
45
+
46
+ with open(image_path, "rb") as f:
47
+ files = {"image": f}
48
+ response = requests.post(api_url, files=files)
49
+
50
+ print(response.json())
51
+ ````
52
+
53
+ ---
54
+
55
+ ### πŸ“¦ Input
56
+
57
+ * JPG or PNG image file
58
+
59
+ ### 🧾 Output
60
+
61
+ A dictionary of class names and confidence scores, e.g.:
62
+
63
+ ```json
64
+ {
65
+ "paper": 0.85,
66
+ "plastic": 0.03,
67
+ "trash": 0.02,
68
+ ...
69
+ }
70
+ ```
71
+
72
+ ---
73
+
74
+ ## πŸ›  Built With
75
+
76
+ * PyTorch
77
+ * TorchVision
78
+ * Gradio
79
+ * Hugging Face Spaces
80
+
81
+ ---
82
+
83
+ ## πŸ“š References
84
+
85
+ * [Hugging Face Spaces Documentation](https://huggingface.co/docs/hub/spaces)
86
+ * [Gradio Documentation](https://www.gradio.app/docs)
87
+ * [PyTorch Documentation](https://pytorch.org/docs)
88
+
89
+ ---
90
+
91
+ ## πŸ‘¨β€πŸ’» Author
92
+
93
+ Made with ❀️ by [Yasir](https://huggingface.co/yasir-13001)