Update app.py
Browse files
app.py
CHANGED
|
@@ -44,7 +44,7 @@ def process_survey(button_type, submission_id):
|
|
| 44 |
else:
|
| 45 |
parsed_param_data = parse_survey_stack_parameters(data)
|
| 46 |
parsed_farm_json, parsed_interactions_json, parsed_trial_json = process_specifications(parsed_input_data, parsed_param_data)
|
| 47 |
-
return parsed_farm_json, parsed_interactions_json, parsed_trial_json, gr.
|
| 48 |
|
| 49 |
except Exception as e:
|
| 50 |
return f"An error occurred while fetching the survey data: {e}"
|
|
@@ -97,9 +97,9 @@ with gr.Blocks() as app:
|
|
| 97 |
param_submit_button = gr.Button("Parse Parameters", visible=False)
|
| 98 |
|
| 99 |
with gr.Row():
|
| 100 |
-
json_output_farm = gr.
|
| 101 |
-
json_output_interactions = gr.
|
| 102 |
-
json_output_trials = gr.
|
| 103 |
|
| 104 |
|
| 105 |
#param_submit_button.click(fn=process_survey, inputs=[survey2_submission_ID, survey_number], outputs=[get_survey_back2])
|
|
|
|
| 44 |
else:
|
| 45 |
parsed_param_data = parse_survey_stack_parameters(data)
|
| 46 |
parsed_farm_json, parsed_interactions_json, parsed_trial_json = process_specifications(parsed_input_data, parsed_param_data)
|
| 47 |
+
return parsed_farm_json, parsed_interactions_json, parsed_trial_json, gr.TextBox(visible=True), gr.TextBox(visible=True), gr.TextBox(visible=True)
|
| 48 |
|
| 49 |
except Exception as e:
|
| 50 |
return f"An error occurred while fetching the survey data: {e}"
|
|
|
|
| 97 |
param_submit_button = gr.Button("Parse Parameters", visible=False)
|
| 98 |
|
| 99 |
with gr.Row():
|
| 100 |
+
json_output_farm = gr.TextBox(label="Farm Data JSON", visible=False)
|
| 101 |
+
json_output_interactions = gr.TextBox(label="Interactions Data JSON", visible=False)
|
| 102 |
+
json_output_trials = gr.TextBox(label="Trials Data JSON", visible=False)
|
| 103 |
|
| 104 |
|
| 105 |
#param_submit_button.click(fn=process_survey, inputs=[survey2_submission_ID, survey_number], outputs=[get_survey_back2])
|