apsys commited on
Commit
562660f
·
1 Parent(s): 00fe44f
Files changed (3) hide show
  1. app.py +3 -3
  2. src/display/css_html_js.py +8 -0
  3. src/display/utils.py +2 -2
app.py CHANGED
@@ -619,9 +619,9 @@ CATEGORY_DISPLAY_MAP = {
619
  'Drug– and Substance–Related Activities': 'Drug Use',
620
  'Sexual Content and Violence': 'Sexual Content',
621
  'Weapon, Explosives, and Hazardous Materials': 'Weapons & Hazmat',
622
- 'Safe Prompts': 'Safe Prompts',
623
  'Cybercrime, Hacking, and Digital Exploits': 'Cybercrime',
624
- 'Creative Content Involving Illicit Themes': 'Illicit Creative'
 
625
  }
626
  # Create reverse mapping for lookups
627
  CATEGORY_REVERSE_MAP = {v: k for k, v in CATEGORY_DISPLAY_MAP.items()}
@@ -672,7 +672,7 @@ with demo:
672
  scale=1
673
  )
674
  with gr.Row():
675
- refresh_button = gr.Button("Refresh", scale=0)
676
 
677
  # Create tabs for each category
678
  with gr.Tabs(elem_classes="category-tabs") as category_tabs:
 
619
  'Drug– and Substance–Related Activities': 'Drug Use',
620
  'Sexual Content and Violence': 'Sexual Content',
621
  'Weapon, Explosives, and Hazardous Materials': 'Weapons & Hazmat',
 
622
  'Cybercrime, Hacking, and Digital Exploits': 'Cybercrime',
623
+ 'Creative Content Involving Illicit Themes': 'Illicit Creative',
624
+ 'Safe Prompts': 'Safe Prompts'
625
  }
626
  # Create reverse mapping for lookups
627
  CATEGORY_REVERSE_MAP = {v: k for k, v in CATEGORY_DISPLAY_MAP.items()}
 
672
  scale=1
673
  )
674
  with gr.Row():
675
+ refresh_button = gr.Button("Refresh", scale=0, elem_id="refresh-button")
676
 
677
  # Create tabs for each category
678
  with gr.Tabs(elem_classes="category-tabs") as category_tabs:
src/display/css_html_js.py CHANGED
@@ -6,6 +6,9 @@ custom_css = """
6
  .markdown-text {
7
  font-size: 16px !important;
8
  text-align: justify !important;
 
 
 
9
  }
10
 
11
  .tab-buttons button.selected {
@@ -86,4 +89,9 @@ custom_css = """
86
  /* background: #18181b !important; */ /* Removed background override */
87
  border-color: #27272a !important;
88
  }
 
 
 
 
 
89
  """
 
6
  .markdown-text {
7
  font-size: 16px !important;
8
  text-align: justify !important;
9
+ line-height: 1.1 !important;
10
+ margin-top: 10px !important;
11
+ margin-bottom: 10px !important;
12
  }
13
 
14
  .tab-buttons button.selected {
 
89
  /* background: #18181b !important; */ /* Removed background override */
90
  border-color: #27272a !important;
91
  }
92
+
93
+ #refresh-button {
94
+ margin-top: 5px !important;
95
+ margin-bottom: 5px !important;
96
+ }
97
  """
src/display/utils.py CHANGED
@@ -384,9 +384,9 @@ CATEGORIES = [
384
  'Drug– and Substance–Related Activities',
385
  'Sexual Content and Violence',
386
  'Weapon, Explosives, and Hazardous Materials',
387
- 'Safe Prompts',
388
  'Cybercrime, Hacking, and Digital Exploits',
389
- 'Creative Content Involving Illicit Themes'
 
390
  ]
391
 
392
  # Test types in GuardBench
 
384
  'Drug– and Substance–Related Activities',
385
  'Sexual Content and Violence',
386
  'Weapon, Explosives, and Hazardous Materials',
 
387
  'Cybercrime, Hacking, and Digital Exploits',
388
+ 'Creative Content Involving Illicit Themes',
389
+ 'Safe Prompts'
390
  ]
391
 
392
  # Test types in GuardBench