cmagganas commited on
Commit
477d34f
1 Parent(s): f16502d

commenting out the csv part of the app

Browse files
Files changed (1) hide show
  1. 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
- # 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:
 
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: