Seetha commited on
Commit
0bd7137
1 Parent(s): e353e23

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -206,7 +206,7 @@ def main():
206
  df_final = df_final.drop("Component",axis=1)
207
  df_final.insert(2, "Component", df['New string'], True)
208
 
209
- df_final.to_csv('/app/ima-pipeline-streamlit/predictions.csv')
210
 
211
  # buffer = io.BytesIO()
212
  # with pd.ExcelWriter(buffer, engine="xlsxwriter") as writer:
@@ -443,13 +443,13 @@ def main():
443
  # 'Society': [count_soc_np, count_soc_investor, count_soc_customer, count_soc_employee, count_soc_society]},
444
  # index=['Non-performance', 'Investors', 'Customers', 'Employees', 'Society'])
445
 
446
- df_tab.to_csv('/app/ima-pipeline-streamlit/final_data.csv')
447
 
448
  buffer = io.BytesIO()
449
  with pd.ExcelWriter(buffer, engine="xlsxwriter") as writer:
450
  df_tab.to_excel(writer,sheet_name="Sheet1",index=False)
451
  writer.close()
452
- df = pd.read_csv('/app/ima-pipeline-streamlit/final_data.csv', index_col=0)
453
 
454
  # Convert to JSON format
455
  json_data = []
@@ -462,11 +462,11 @@ def main():
462
  })
463
 
464
  # Write JSON to file
465
- with open('/app/ima-pipeline-streamlit/ch.json', 'w') as f:
466
  json.dump(json_data, f)
467
 
468
- csv_file = "/app/ima-pipeline-streamlit/predictions.csv"
469
- json_file = "/app/ima-pipeline-streamlit/smalljson.json"
470
 
471
  # Open the CSV file and read the data
472
  with open(csv_file, "r") as f:
 
206
  df_final = df_final.drop("Component",axis=1)
207
  df_final.insert(2, "Component", df['New string'], True)
208
 
209
+ df_final.to_csv('predictions.csv')
210
 
211
  # buffer = io.BytesIO()
212
  # with pd.ExcelWriter(buffer, engine="xlsxwriter") as writer:
 
443
  # 'Society': [count_soc_np, count_soc_investor, count_soc_customer, count_soc_employee, count_soc_society]},
444
  # index=['Non-performance', 'Investors', 'Customers', 'Employees', 'Society'])
445
 
446
+ df_tab.to_csv('final_data.csv')
447
 
448
  buffer = io.BytesIO()
449
  with pd.ExcelWriter(buffer, engine="xlsxwriter") as writer:
450
  df_tab.to_excel(writer,sheet_name="Sheet1",index=False)
451
  writer.close()
452
+ df = pd.read_csv('final_data.csv', index_col=0)
453
 
454
  # Convert to JSON format
455
  json_data = []
 
462
  })
463
 
464
  # Write JSON to file
465
+ with open('ch.json', 'w') as f:
466
  json.dump(json_data, f)
467
 
468
+ csv_file = "predictions.csv"
469
+ json_file = "smalljson.json"
470
 
471
  # Open the CSV file and read the data
472
  with open(csv_file, "r") as f: