sachithcheruvaturfynd commited on
Commit
9e68b62
·
verified ·
1 Parent(s): 254663e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -29,9 +29,8 @@ dataset_choice = st.selectbox(
29
  if dataset_choice == "Sephora Order Complete Dataset":
30
  list_of_products_to_display = {}
31
  for itemid in (list(all_products_with_names_sephora.keys())): #for items in the total list of items in all transactions
32
- if itemid[0:3]!="600":
33
- if itemid in (list(corrected_fp_growth_results_sephora.keys())): #if the item has a result from fp-growth
34
- list_of_products_to_display[itemid]= all_products_with_names_sephora[itemid] #show it in the drop down menu
35
 
36
 
37
  name_to_id = {name: product_id for product_id, name in list_of_products_to_display.items()} # Reverse the dictionary to map product names to IDs
@@ -48,8 +47,9 @@ if dataset_choice == "Sephora Order Complete Dataset":
48
  if dataset_choice == "Reliance Digital Order Complete Dataset":
49
  list_of_products_to_display = {}
50
  for itemid in (list(all_products_with_names.keys())): #for items in the total list of items in all transactions
51
- if itemid in (list(corrected_fp_growth_results.keys())): #if the item has a result from fp-growth
52
- list_of_products_to_display[itemid]= all_products_with_names[itemid] #show it in the drop down menu
 
53
 
54
  name_to_id = {name: product_id for product_id, name in list_of_products_to_display.items()} # Reverse the dictionary to map product names to IDs
55
  selected_product_name = st.selectbox('Select A Product:', list(name_to_id.keys())) # Create a dropdown menu with the product names
 
29
  if dataset_choice == "Sephora Order Complete Dataset":
30
  list_of_products_to_display = {}
31
  for itemid in (list(all_products_with_names_sephora.keys())): #for items in the total list of items in all transactions
32
+ if itemid in (list(corrected_fp_growth_results_sephora.keys())): #if the item has a result from fp-growth
33
+ list_of_products_to_display[itemid]= all_products_with_names_sephora[itemid] #show it in the drop down menu
 
34
 
35
 
36
  name_to_id = {name: product_id for product_id, name in list_of_products_to_display.items()} # Reverse the dictionary to map product names to IDs
 
47
  if dataset_choice == "Reliance Digital Order Complete Dataset":
48
  list_of_products_to_display = {}
49
  for itemid in (list(all_products_with_names.keys())): #for items in the total list of items in all transactions
50
+ if itemid[0:3]!="600":
51
+ if itemid in (list(corrected_fp_growth_results.keys())): #if the item has a result from fp-growth
52
+ list_of_products_to_display[itemid]= all_products_with_names[itemid] #show it in the drop down menu
53
 
54
  name_to_id = {name: product_id for product_id, name in list_of_products_to_display.items()} # Reverse the dictionary to map product names to IDs
55
  selected_product_name = st.selectbox('Select A Product:', list(name_to_id.keys())) # Create a dropdown menu with the product names