Herc commited on
Commit
6427d95
·
verified ·
1 Parent(s): d056bf0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -12,6 +12,11 @@ def random_date():
12
  # Function to load and cache the product catalog
13
  @st.cache_data
14
  def load_catalog():
 
 
 
 
 
15
  products = {
16
  "Product Name": [
17
  "Notepad++", "WinRAR", "7-Zip", "CCleaner", "TeamViewer",
@@ -41,8 +46,8 @@ def load_catalog():
41
  "Accessibility Approved": [random.choice([True, False]) for _ in range(50)],
42
  "Privacy Approved": [random.choice([True, False]) for _ in range(50)],
43
  "Review Date": [random_date() for _ in range(50)],
44
- "Review Status": [random.choice(["Approved", "Under Review", "Not Approved"]) for _ in range(50)],
45
- "Not Approved Reason": [None if status != "Not Approved" else random.choice(["Security Concern", "Licensing Issue", "Privacy Issue", "Compliance Requirement"]) for status in ["Approved", "Under Review", "Not Approved"]*8 + ["Not Approved"]]
46
  }
47
  return pd.DataFrame(products)
48
 
 
12
  # Function to load and cache the product catalog
13
  @st.cache_data
14
  def load_catalog():
15
+ review_statuses = [random.choice(["Approved", "Under Review", "Not Approved"]) for _ in range(50)]
16
+ not_approved_reasons = [
17
+ None if status != "Not Approved" else random.choice(["Security Concern", "Licensing Issue", "Privacy Issue", "Compliance Requirement"])
18
+ for status in review_statuses
19
+ ]
20
  products = {
21
  "Product Name": [
22
  "Notepad++", "WinRAR", "7-Zip", "CCleaner", "TeamViewer",
 
46
  "Accessibility Approved": [random.choice([True, False]) for _ in range(50)],
47
  "Privacy Approved": [random.choice([True, False]) for _ in range(50)],
48
  "Review Date": [random_date() for _ in range(50)],
49
+ "Review Status": review_statuses,
50
+ "Not Approved Reason": not_approved_reasons
51
  }
52
  return pd.DataFrame(products)
53