Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ def info(type):
|
|
25 |
if (type == 'Primary'):
|
26 |
return "Your recyclable type is Primary, which makes up the most recyclable materials. You're in luck, your material can just be put in your curbside blue bin, or wherever you usually recycle."
|
27 |
elif (type == 'Tertiary'):
|
28 |
-
return "Tertiary items are the least recyclable materials. These materials may hard to recycle because of residue (such as adhesive or liquid).
|
29 |
elif (type == 'Metals'):
|
30 |
return "Metals should be transported to your local scrapyard, which, according to your location is at New World Recycling, 1079 E 5th Ave, Columbus, OH."
|
31 |
elif (type == 'Organic Matter'):
|
@@ -38,11 +38,21 @@ def info(type):
|
|
38 |
with gr.Blocks() as infoBlock:
|
39 |
gr.Markdown("Welcome to the Waste Detective Information Center!")
|
40 |
with gr.Row():
|
41 |
-
inp = gr.Textbox(placeholder = "What recyclable
|
42 |
out = gr.Textbox()
|
43 |
-
btn = gr.Button("How do I
|
44 |
btn.click(fn = info, inputs = inp, outputs = out)
|
45 |
|
46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
47 |
|
48 |
intf.launch(inline = False, share = True)
|
|
|
25 |
if (type == 'Primary'):
|
26 |
return "Your recyclable type is Primary, which makes up the most recyclable materials. You're in luck, your material can just be put in your curbside blue bin, or wherever you usually recycle."
|
27 |
elif (type == 'Tertiary'):
|
28 |
+
return "Tertiary items are the least recyclable materials. These materials may hard to recycle because of residue (such as adhesive or liquid), so make sure to clean your recyclable before you put it curbside. These items are usually used as feedstock (raw material to supply or fuel a machine or industrial process) in a process to make new chemicals and fuels."
|
29 |
elif (type == 'Metals'):
|
30 |
return "Metals should be transported to your local scrapyard, which, according to your location is at New World Recycling, 1079 E 5th Ave, Columbus, OH."
|
31 |
elif (type == 'Organic Matter'):
|
|
|
38 |
with gr.Blocks() as infoBlock:
|
39 |
gr.Markdown("Welcome to the Waste Detective Information Center!")
|
40 |
with gr.Row():
|
41 |
+
inp = gr.Textbox(placeholder = "What type of recyclable did you get?")
|
42 |
out = gr.Textbox()
|
43 |
+
btn = gr.Button("How do I recycle this?")
|
44 |
btn.click(fn = info, inputs = inp, outputs = out)
|
45 |
|
46 |
+
with gr.Blocks() as impact:
|
47 |
+
with gr.Accordian("Plastic Bags"):
|
48 |
+
gr.Markdown("Over 80 percent of landfills are plastic bags, the largest margin by far. Plastic bags break down into tiny toxic particles that contaminate soil and waterways when they’re not recycled properly. They also enter the food chain when animals accidentally ingest them.")
|
49 |
+
with gr.Accordian("Soda Cans"):
|
50 |
+
gr.Markdown("Around 1.3 percent of landfills are cans, and 6,700 thousand cans that are made per second. You can reduce waste from cans by using reusable bottles/cups for beverages on-the-go.")
|
51 |
+
with gr.Accordian("Glass"):
|
52 |
+
gr.Markdown("About 31 percent of landfills is glass, and it's one of the more dangerous wastes because it doesn't biodegrade at all. The biodegradation-less nature of glass isn’t harmful to our environment, it takes a million years for glass to break down. Instead of being used for something productive, it just sits and does nothing.")
|
53 |
+
with gr.Accordian("Food Waste"):
|
54 |
+
gr.Markdown("The EPA estimates that 24 percent of landfills are food waste. When certain types of When food waste are not recycled, it contributes to significant environmental damage because it releases methane, wasting valuable resources that make the food, which could lead to increasing the cost of food production. To reduce your impact, store food properly, make meal plans, use a compost bin for foods that can be composed, or only buy what you need.")
|
55 |
+
|
56 |
+
intf = gr.TabbedInterface([modelIntf, infoBlock, impact], ["Waste Detective", "Info Center", "The Impact of Trash"], "Waste Detective", "ocean")
|
57 |
|
58 |
intf.launch(inline = False, share = True)
|