dataprincess commited on
Commit
623c2aa
·
verified ·
1 Parent(s): 15dfb11

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -67,7 +67,11 @@ if user_type == 'New User':
67
  'Processor Brand', 'SSD', 'RAM (in GB)', 'RAM Type', 'Expandable Memory',
68
  'Operating System', 'Touchscreen', 'Screen Size (in inch)', 'Weight (in kg)',
69
  'Refresh Rate', 'screen_resolution', 'company', 'Storage', 'Processor name',
70
- 'CPU_ranking', 'battery_backup', 'gpu name ', 'gpu_benchmark', 'link']]
 
 
 
 
71
 
72
  st.table(recommendations_table)
73
 
@@ -86,7 +90,11 @@ elif user_type == 'Existing User':
86
  'Processor Brand', 'SSD', 'RAM (in GB)', 'RAM Type', 'Expandable Memory',
87
  'Operating System', 'Touchscreen', 'Screen Size (in inch)', 'Weight (in kg)',
88
  'Refresh Rate', 'screen_resolution', 'company', 'Storage', 'Processor name',
89
- 'CPU_ranking', 'battery_backup', 'gpu name ', 'gpu_benchmark', 'link']]
 
 
 
 
90
 
91
  st.table(recommendations_table)
92
  else:
 
67
  'Processor Brand', 'SSD', 'RAM (in GB)', 'RAM Type', 'Expandable Memory',
68
  'Operating System', 'Touchscreen', 'Screen Size (in inch)', 'Weight (in kg)',
69
  'Refresh Rate', 'screen_resolution', 'company', 'Storage', 'Processor name',
70
+ 'CPU_ranking', 'battery_backup', 'gpu name ', 'gpu_benchmark']]
71
+
72
+ # Hyperlink the 'click to buy' text for the link column
73
+ recommendations_table['link'] = recommendations_table['link'].apply(lambda x: f"[click to buy]({x})")
74
+ recommendations_table = recommendations_table.reset_index(drop=True)
75
 
76
  st.table(recommendations_table)
77
 
 
90
  'Processor Brand', 'SSD', 'RAM (in GB)', 'RAM Type', 'Expandable Memory',
91
  'Operating System', 'Touchscreen', 'Screen Size (in inch)', 'Weight (in kg)',
92
  'Refresh Rate', 'screen_resolution', 'company', 'Storage', 'Processor name',
93
+ 'CPU_ranking', 'battery_backup', 'gpu name ', 'gpu_benchmark']]
94
+
95
+ # Hyperlink the 'click to buy' text for the link column
96
+ recommendations_table['link'] = recommendations_table['link'].apply(lambda x: f"[click to buy]({x})")
97
+ recommendations_table = recommendations_table.reset_index(drop=True)
98
 
99
  st.table(recommendations_table)
100
  else: