Spaces:
Runtime error
Runtime error
commenting out the csv part of the app
Browse files- app/app.py +20 -20
app/app.py
CHANGED
@@ -42,32 +42,32 @@ if st.button("Run Data Cleaning API"):
|
|
42 |
st.write(json_to_dict(response_content))
|
43 |
|
44 |
# if csv_file is not empty, run data cleaning API on csv_file
|
45 |
-
elif csv_file:
|
46 |
|
47 |
-
|
48 |
-
|
49 |
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
|
54 |
-
|
55 |
-
|
56 |
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
|
63 |
-
|
64 |
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
|
72 |
# if both text_input and csv_file are empty, display error message
|
73 |
else:
|
|
|
42 |
st.write(json_to_dict(response_content))
|
43 |
|
44 |
# if csv_file is not empty, run data cleaning API on csv_file
|
45 |
+
# elif csv_file:
|
46 |
|
47 |
+
# # run data cleaning API on csv_file
|
48 |
+
# output_df = main(csv_file)
|
49 |
|
50 |
+
# @st.cache_data
|
51 |
+
# def convert_df(df):
|
52 |
+
# """coverting dataframe to csv
|
53 |
|
54 |
+
# Args:
|
55 |
+
# df (_type_): pd.DataFrame
|
56 |
|
57 |
+
# Returns:
|
58 |
+
# _type_: csv
|
59 |
+
# """
|
60 |
+
# # IMPORTANT: Cache the conversion to prevent computation on every rerun
|
61 |
+
# return df.to_csv().encode('utf-8')
|
62 |
|
63 |
+
# csv = convert_df(output_df)
|
64 |
|
65 |
+
# st.download_button(
|
66 |
+
# label="Download data as CSV",
|
67 |
+
# data=csv,
|
68 |
+
# file_name='cleaned_df.csv',
|
69 |
+
# mime='text/csv',
|
70 |
+
# )
|
71 |
|
72 |
# if both text_input and csv_file are empty, display error message
|
73 |
else:
|