Update app.py
Browse files
app.py
CHANGED
|
@@ -23,11 +23,13 @@ def run_validation(survey_file, uuid):
|
|
| 23 |
|
| 24 |
# Pass all inputs to your function (update name/args as needed)
|
| 25 |
# For example, if your function is: process_survey(survey_df, choices_df, questions_df, indicators_df, uuid)
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
|
|
|
|
|
|
| 29 |
# Assume result is a DataFrame, can adjust to return Excel, text, etc.
|
| 30 |
-
return
|
| 31 |
|
| 32 |
with gr.Blocks() as app:
|
| 33 |
gr.Markdown("## Survey Validation App")
|
|
@@ -40,7 +42,7 @@ with gr.Blocks() as app:
|
|
| 40 |
run_btn.click(
|
| 41 |
run_validation,
|
| 42 |
inputs=[survey_file, uuid_box],
|
| 43 |
-
outputs=
|
| 44 |
)
|
| 45 |
|
| 46 |
if __name__ == "__main__":
|
|
|
|
| 23 |
|
| 24 |
# Pass all inputs to your function (update name/args as needed)
|
| 25 |
# For example, if your function is: process_survey(survey_df, choices_df, questions_df, indicators_df, uuid)
|
| 26 |
+
indicator_df, questions_df, choice_df, data_all, raw_data, column_strategy_df = f.load_dataframes(
|
| 27 |
+
indicator_path,
|
| 28 |
+
questions_path,
|
| 29 |
+
choice_path,
|
| 30 |
+
survey_path)
|
| 31 |
# Assume result is a DataFrame, can adjust to return Excel, text, etc.
|
| 32 |
+
return indicator_df, questions_df, choice_df, data_all, raw_data, column_strategy_df
|
| 33 |
|
| 34 |
with gr.Blocks() as app:
|
| 35 |
gr.Markdown("## Survey Validation App")
|
|
|
|
| 42 |
run_btn.click(
|
| 43 |
run_validation,
|
| 44 |
inputs=[survey_file, uuid_box],
|
| 45 |
+
outputs=indicator_df, questions_df, choice_df, data_all, raw_data, column_strategy_df
|
| 46 |
)
|
| 47 |
|
| 48 |
if __name__ == "__main__":
|