ajuneja23 commited on
Commit
bd5195e
1 Parent(s): 6d1f923

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -25
app.py CHANGED
@@ -30,38 +30,17 @@ import getpass
30
  import re
31
  import os
32
 
33
- from google.colab import drive
34
- drive.mount('/content/drive')
35
 
36
  os.environ['OPENAI_API_KEY']='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'
37
 
38
- def import_df_without_outliers():
39
- df = pd.read_excel('/content/drive/Shareddrives/RAG_SYS_PETCO/data/2023_CRM_Wharton.xlsx')
40
- df = df[(df['CTR'] < 0.0075) & (df['CLICKS'] < 100000)]
41
- df['OPEN_RATE'] = df['OPEN_RATE'] * 10000
42
- df['CTR'] = df['CTR'] * 10000
43
- df['UNSUBSCRIBE_RATE'] = df['UNSUBSCRIBE_RATE'] * 10000
44
- return df
45
 
46
- CRM_data = import_df_without_outliers()
47
-
48
- petco_text = pd.read_csv("/content/drive/Shareddrives/RAG_SYS_PETCO/data/cleanedTextData_final_aadit.csv")
49
- #petco_text = petco_text.drop('Unnamed: 0', axis=1)
50
- petco_text = petco_text.rename(columns={"campaign":"CAMPAIGN_NAME"})
51
-
52
- final_df = pd.merge(CRM_data, petco_text, on="CAMPAIGN_NAME", how="left")
53
- final_df = final_df[final_df['CAMPAIGN_NAME'] != "20230221_VDay_Clearance"]
54
-
55
- final_df.isna().sum()
56
-
57
- # final_df.to_csv('/content/drive/Shareddrives/RAG_SYS_PETCO/data/petco_rag_df.csv', index=False)
58
-
59
- final_df = pd.read_csv('/content/drive/Shareddrives/RAG_SYS_PETCO/data/petco_rag_df.csv')
60
 
61
  final_df.head(2)
62
 
63
- vision_description = pd.read_csv('/content/drive/Shareddrives/RAG_SYS_PETCO/data/vision_descriptions.csv')
64
- vision_description = vision_description.drop('Unnamed: 0', axis=1)
65
 
66
  columns_to_drop = ['DAY_ID','SENDS','OPENS','OPEN_RATE','CLICKS','CTR','UNSUBSCRIBE_RATE']
67
  vision_description = vision_description.drop(columns=columns_to_drop)
 
30
  import re
31
  import os
32
 
33
+ #from google.colab import drive
34
+ #drive.mount('/content/drive')
35
 
36
  os.environ['OPENAI_API_KEY']='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'
37
 
 
 
 
 
 
 
 
38
 
39
+ final_df = pd.read_csv('petco_rag_df.csv')
 
 
 
 
 
 
 
 
 
 
 
 
 
40
 
41
  final_df.head(2)
42
 
43
+
 
44
 
45
  columns_to_drop = ['DAY_ID','SENDS','OPENS','OPEN_RATE','CLICKS','CTR','UNSUBSCRIBE_RATE']
46
  vision_description = vision_description.drop(columns=columns_to_drop)