amadinahmed
commited on
Commit
·
2f0905b
1
Parent(s):
da6a89f
afdaffa
Browse files
app.py
CHANGED
@@ -117,13 +117,17 @@ def predict_image(inp):
|
|
117 |
|
118 |
return material_preds, specific_preds, recyclable_qn, recyclable_advice
|
119 |
|
|
|
|
|
|
|
|
|
|
|
120 |
|
121 |
-
|
122 |
-
with gr.Blocks(title="Trash Classification", css="#custom_header {min-height: 3rem} #custom_title {min-height: 3rem; text-align: center}") as demo:
|
123 |
|
124 |
with gr.Column():
|
125 |
with gr.Row():
|
126 |
-
item_probs = gr.outputs.Label()
|
127 |
with gr.Column():
|
128 |
gr.Markdown("## Inputs", elem_id="custom_header")
|
129 |
input_image = gr.Image(label="Input Image")
|
@@ -133,9 +137,10 @@ with gr.Blocks(title="Trash Classification", css="#custom_header {min-height: 3r
|
|
133 |
with gr.Column():
|
134 |
gr.Markdown("## Outputs", elem_id="custom_header")
|
135 |
gr.Markdown("### Can it Recycle?")
|
136 |
-
recycling_qn = gr.outputs.Label()
|
137 |
-
gr.Markdown("### How to recycle?")
|
138 |
recycling_advice = gr.outputs.Label()
|
|
|
|
|
|
|
139 |
|
140 |
|
141 |
gr.Examples(
|
|
|
117 |
|
118 |
return material_preds, specific_preds, recyclable_qn, recyclable_advice
|
119 |
|
120 |
+
css = """
|
121 |
+
#warning {background-color: #FFCCCB}
|
122 |
+
#custom_header {min-height: 3rem} #custom_title {min-height: 3rem; text-align: center}
|
123 |
+
.feedback textarea {font-size: 24px !important}
|
124 |
+
"""
|
125 |
|
126 |
+
with gr.Blocks(title="Trash Classification", css=css) as demo:
|
|
|
127 |
|
128 |
with gr.Column():
|
129 |
with gr.Row():
|
130 |
+
item_probs = gr.outputs.Label(num_top_classes=0)
|
131 |
with gr.Column():
|
132 |
gr.Markdown("## Inputs", elem_id="custom_header")
|
133 |
input_image = gr.Image(label="Input Image")
|
|
|
137 |
with gr.Column():
|
138 |
gr.Markdown("## Outputs", elem_id="custom_header")
|
139 |
gr.Markdown("### Can it Recycle?")
|
|
|
|
|
140 |
recycling_advice = gr.outputs.Label()
|
141 |
+
gr.Markdown("### How to recycle?")
|
142 |
+
recycling_qn = gr.outputs.Label()
|
143 |
+
|
144 |
|
145 |
|
146 |
gr.Examples(
|