Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -157,4 +157,13 @@ with gr.Blocks(css=custom_css) as app:
|
|
| 157 |
], label="Select Your Age Range", value="30+ (Adult)")
|
| 158 |
|
| 159 |
# Using HTML component for the boxed output
|
| 160 |
-
output_html = gr.HTML()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
], label="Select Your Age Range", value="30+ (Adult)")
|
| 158 |
|
| 159 |
# Using HTML component for the boxed output
|
| 160 |
+
output_html = gr.HTML()
|
| 161 |
+
|
| 162 |
+
with gr.Row():
|
| 163 |
+
generate_button = gr.Button("Get Safety Advice")
|
| 164 |
+
clear_button = gr.Button("Clear")
|
| 165 |
+
|
| 166 |
+
generate_button.click(safety_advice, inputs=[situation_input, age_range_input], outputs=[output_html])
|
| 167 |
+
clear_button.click(clear_fields, inputs=[], outputs=[situation_input, age_range_input, output_html])
|
| 168 |
+
|
| 169 |
+
app.launch(share=True)
|