Update app.py
Browse files
app.py
CHANGED
|
@@ -56,10 +56,20 @@ def run_validation(survey_file, uuid):
|
|
| 56 |
table_4_1 = []
|
| 57 |
table_4_2 = []
|
| 58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
|
|
|
|
| 60 |
|
| 61 |
-
# Assume result is a DataFrame, can adjust to return Excel, text, etc.
|
| 62 |
-
return indicator_df, questions_df, choice_df, data_all, raw_data, column_strategy_df
|
| 63 |
|
| 64 |
with gr.Blocks() as app:
|
| 65 |
gr.Markdown("## Survey Validation App")
|
|
@@ -72,7 +82,7 @@ with gr.Blocks() as app:
|
|
| 72 |
run_btn.click(
|
| 73 |
run_validation,
|
| 74 |
inputs=[survey_file, uuid_box],
|
| 75 |
-
outputs=
|
| 76 |
)
|
| 77 |
|
| 78 |
if __name__ == "__main__":
|
|
|
|
| 56 |
table_4_1 = []
|
| 57 |
table_4_2 = []
|
| 58 |
|
| 59 |
+
report = f.generate_data_quality_report(
|
| 60 |
+
segmentation='no',
|
| 61 |
+
table_1_1=table_1_1,
|
| 62 |
+
table_2_1=table_2_1,
|
| 63 |
+
table_2_3=table_2_3,
|
| 64 |
+
table_3_1=None,
|
| 65 |
+
table_3_2=None,
|
| 66 |
+
table_3_3=table_3_3,
|
| 67 |
+
table_3_4=table_3_4, # Replace with actual data
|
| 68 |
+
table_4_1=table_4_1 # Replace with actual data
|
| 69 |
+
)
|
| 70 |
|
| 71 |
+
print(report)
|
| 72 |
|
|
|
|
|
|
|
| 73 |
|
| 74 |
with gr.Blocks() as app:
|
| 75 |
gr.Markdown("## Survey Validation App")
|
|
|
|
| 82 |
run_btn.click(
|
| 83 |
run_validation,
|
| 84 |
inputs=[survey_file, uuid_box],
|
| 85 |
+
outputs=[]
|
| 86 |
)
|
| 87 |
|
| 88 |
if __name__ == "__main__":
|