Vaibhav84 commited on
Commit
925e026
·
1 Parent(s): d034937
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -47,7 +47,11 @@ nlp = spacy.load("en_core_web_lg")
47
  skill_extractor = SkillExtractor(nlp, SKILL_DB, PhraseMatcher)
48
  model = SentenceTransformer('all-MiniLM-L6-v2')
49
 
50
- purchase_history = pd.read_excel('datasetsample.xlsx', sheet_name='Transaction History',
 
 
 
 
51
  parse_dates=['Purchase_Date'])
52
  purchase_history['Customer_Id'] = purchase_history['Customer_Id'].astype(str)
53
  product_categories = purchase_history[['Product_Id', 'Category']].drop_duplicates().set_index('Product_Id')['Category'].to_dict()
 
47
  skill_extractor = SkillExtractor(nlp, SKILL_DB, PhraseMatcher)
48
  model = SentenceTransformer('all-MiniLM-L6-v2')
49
 
50
+ # Get the current directory path
51
+ current_dir = os.path.dirname(os.path.abspath(__file__))
52
+ excel_path = os.path.join(current_dir, 'datasetsample.xlsx')
53
+
54
+ purchase_history = pd.read_excel(excel_path, sheet_name='Transaction History',
55
  parse_dates=['Purchase_Date'])
56
  purchase_history['Customer_Id'] = purchase_history['Customer_Id'].astype(str)
57
  product_categories = purchase_history[['Product_Id', 'Category']].drop_duplicates().set_index('Product_Id')['Category'].to_dict()