Abdullah172 commited on
Commit
2c1f742
·
verified ·
1 Parent(s): 3e4d3ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -21
app.py CHANGED
@@ -1,29 +1,17 @@
1
- """
2
- charts.py — Plotly chart builders for Mental Health Information Verification.
3
- Pure functions, no Streamlit/Gradio imports.
4
- """
5
-
6
- from typing import Dict, List, Tuple
7
- import plotly.graph_objects as go
8
- import pandas as pd
9
- import numpy as np
10
-
11
-
12
  # ============================================================
13
- # Medical / Mental Health Information Theme
14
  # ============================================================
15
 
16
- DARK_BG = "#000000"
17
- CARD_BG = "#f8fafc"
18
  BORDER = "#e2e8f0"
19
  TEXT_MAIN = "#1e293b"
20
  TEXT_DIM = "#64748b"
21
 
22
- # Medical information-verification palette
23
- CYAN = "#0891b2" # clinical cyan
24
- GREEN = "#10b981" # reliable / safe information
25
- RED = "#ef4444" # misinformation risk
26
- AMBER = "#f59e0b" # uncertain / mixed
27
  PURPLE = "#8b5cf6"
28
  BLUE = "#2563eb"
29
 
@@ -35,11 +23,10 @@ PLOTLY_LAYOUT = dict(
35
  hoverlabel=dict(
36
  bgcolor="#ffffff",
37
  bordercolor=CYAN,
38
- font=dict(color=TEXT_MAIN, family="'Inter', sans-serif", size=12),
39
  ),
40
  )
41
 
42
-
43
  def make_interactive(fig: go.Figure, height: int = 300) -> go.Figure:
44
  """Apply shared interactive behaviour to every chart."""
45
  fig.update_layout(
 
 
 
 
 
 
 
 
 
 
 
 
1
  # ============================================================
2
+ # Medical / Mental Health Information Theme (WHITE FIXED)
3
  # ============================================================
4
 
5
+ DARK_BG = "#ffffff" # FIXED: white background
6
+ CARD_BG = "#ffffff" # FIXED: white cards
7
  BORDER = "#e2e8f0"
8
  TEXT_MAIN = "#1e293b"
9
  TEXT_DIM = "#64748b"
10
 
11
+ CYAN = "#0891b2"
12
+ GREEN = "#10b981"
13
+ RED = "#ef4444"
14
+ AMBER = "#f59e0b"
 
15
  PURPLE = "#8b5cf6"
16
  BLUE = "#2563eb"
17
 
 
23
  hoverlabel=dict(
24
  bgcolor="#ffffff",
25
  bordercolor=CYAN,
26
+ font=dict(color=TEXT_MAIN, size=12),
27
  ),
28
  )
29
 
 
30
  def make_interactive(fig: go.Figure, height: int = 300) -> go.Figure:
31
  """Apply shared interactive behaviour to every chart."""
32
  fig.update_layout(