Spaces:
Paused
Paused
Create retriever.py
Browse files- retriever.py +24 -0
retriever.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
def get_recommendations(transport, diet, electricity, shopping_freq):
|
| 2 |
+
tips = []
|
| 3 |
+
|
| 4 |
+
if transport == "Car":
|
| 5 |
+
tips.append("Consider carpooling or switching to public transport to reduce emissions.")
|
| 6 |
+
elif transport == "Electric Vehicle":
|
| 7 |
+
tips.append("Great job! Charging with renewable energy can further reduce your footprint.")
|
| 8 |
+
|
| 9 |
+
if diet == "Meat-heavy":
|
| 10 |
+
tips.append("Try reducing red meat intake. Even one meat-free day per week helps.")
|
| 11 |
+
elif diet == "Vegan":
|
| 12 |
+
tips.append("Awesome! Plant-based diets are among the most sustainable.")
|
| 13 |
+
|
| 14 |
+
if electricity > 500:
|
| 15 |
+
tips.append("Switch to energy-efficient appliances and LED lighting.")
|
| 16 |
+
else:
|
| 17 |
+
tips.append("Your electricity usage is relatively low. Keep it up!")
|
| 18 |
+
|
| 19 |
+
if shopping_freq in ["Every week", "Monthly"]:
|
| 20 |
+
tips.append("Try second-hand or upcycled clothing to reduce fast fashion waste.")
|
| 21 |
+
else:
|
| 22 |
+
tips.append("Minimal shopping habits reduce environmental impact.")
|
| 23 |
+
|
| 24 |
+
return tips
|