JerLag commited on
Commit
5f6b7b3
·
verified ·
1 Parent(s): d4fa0ca

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -0
app.py CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  # -*- coding: utf-8 -*-
2
  """
3
  NPS Assurance — Gradio (Paste-only, NPS inféré)
@@ -15,6 +20,25 @@ import gradio as gr
15
  import plotly.express as px
16
  import plotly.graph_objects as go
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  # --- unidecode (fallback si paquet absent) ---
19
  try:
20
  from unidecode import unidecode
@@ -458,3 +482,5 @@ with gr.Blocks(title="NPS — Analyse (Assurance)") as demo:
458
 
459
  if __name__=="__main__":
460
  demo.launch(share=False, show_api=False)
 
 
 
1
+ apply_plotly_theme()
2
+ with gr.Blocks(title="Verbatify — Analyse NPS", css=VB_CSS) as demo:
3
+ gr.HTML('<div class="vb-hero"><img src="verbatify-logo.svg" height="24"/><div><div class="vb-title">Verbatify — Analyse NPS</div><div class="vb-sub">Émotions • Thématiques • Occurrences • Synthèse</div></div></div>')
4
+ # ... le reste inchangé ...
5
+
6
  # -*- coding: utf-8 -*-
7
  """
8
  NPS Assurance — Gradio (Paste-only, NPS inféré)
 
20
  import plotly.express as px
21
  import plotly.graph_objects as go
22
 
23
+ import plotly.io as pio
24
+ # charge le CSS de marque
25
+ VB_CSS = open("verbatify.css","r",encoding="utf-8").read()
26
+
27
+ def apply_plotly_theme():
28
+ import plotly.graph_objects as go
29
+ pio.templates["verbatify"] = go.layout.Template(
30
+ layout=go.Layout(
31
+ font=dict(family="Manrope, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif", size=13, color="#0F172A"),
32
+ paper_bgcolor="white", plot_bgcolor="white",
33
+ colorway=["#7C3AED","#06B6D4","#2563EB","#10B981","#EF4444","#F59E0B","#14B8A6","#F43F5E"],
34
+ xaxis=dict(gridcolor="#E2E8F0", zerolinecolor="#E2E8F0"),
35
+ yaxis=dict(gridcolor="#E2E8F0", zerolinecolor="#E2E8F0"),
36
+ legend=dict(borderwidth=0, bgcolor="rgba(255,255,255,0)")
37
+ )
38
+ )
39
+ pio.templates.default = "verbatify"
40
+
41
+
42
  # --- unidecode (fallback si paquet absent) ---
43
  try:
44
  from unidecode import unidecode
 
482
 
483
  if __name__=="__main__":
484
  demo.launch(share=False, show_api=False)
485
+
486
+ gr.HTML('<div class="vb-footer">© Verbatify.com — Construit par <a href="https://jeremy-lagache.fr/">Jérémy-lagache.fr</a></div>')