Update app.py
Browse files
app.py
CHANGED
|
@@ -323,6 +323,9 @@ with gr.Blocks() as demo:
|
|
| 323 |
soil_data_input = gr.Textbox(label="Enter your soil data", placeholder="Description, Structure, Biology", visible=False)
|
| 324 |
yield_data_input = gr.Textbox(label="Enter your yield data", placeholder="Quantity, Quality", visible=False)
|
| 325 |
|
|
|
|
|
|
|
|
|
|
| 326 |
with gr.Row():
|
| 327 |
farm_output_box = gr.Textbox(label="Fields and Activities Output Data")
|
| 328 |
interactions_output_box = gr.Textbox(label="Interactions Output Data")
|
|
@@ -354,7 +357,7 @@ with gr.Blocks() as demo:
|
|
| 354 |
interactions_xml = dicttoxml(interactions_dict)
|
| 355 |
trials_xml = dicttoxml(trials_dict)
|
| 356 |
|
| 357 |
-
xml_outputs = [farm_xml,
|
| 358 |
return farm_xml, interactions_xml, trials_xml
|
| 359 |
elif toggle and xml_outputs:
|
| 360 |
return xml_outputs[0], xml_outputs[1], xml_outputs[2]
|
|
|
|
| 323 |
soil_data_input = gr.Textbox(label="Enter your soil data", placeholder="Description, Structure, Biology", visible=False)
|
| 324 |
yield_data_input = gr.Textbox(label="Enter your yield data", placeholder="Quantity, Quality", visible=False)
|
| 325 |
|
| 326 |
+
original_outputs = None
|
| 327 |
+
xml_outputs = None
|
| 328 |
+
|
| 329 |
with gr.Row():
|
| 330 |
farm_output_box = gr.Textbox(label="Fields and Activities Output Data")
|
| 331 |
interactions_output_box = gr.Textbox(label="Interactions Output Data")
|
|
|
|
| 357 |
interactions_xml = dicttoxml(interactions_dict)
|
| 358 |
trials_xml = dicttoxml(trials_dict)
|
| 359 |
|
| 360 |
+
xml_outputs = [farm_xml, interactions_xml, trials_xml]
|
| 361 |
return farm_xml, interactions_xml, trials_xml
|
| 362 |
elif toggle and xml_outputs:
|
| 363 |
return xml_outputs[0], xml_outputs[1], xml_outputs[2]
|