Spaces:
Running
Running
Upload config.py
Browse files
config.py
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import panel as pn
|
2 |
+
|
3 |
+
# --- Styling Placeholders ---
|
4 |
+
# These can be populated with actual Bokeh/Panel styling dictionaries or CSS
|
5 |
+
slider_design = {}
|
6 |
+
slider_style = {}
|
7 |
+
slider_stylesheet = [] # For Panel >= 0.14, stylesheets can be CSS files or strings
|
8 |
+
|
9 |
+
|
10 |
+
# --- Helper for NumberFormatters ---
|
11 |
+
def get_formatter(format_str):
|
12 |
+
if format_str == "%i":
|
13 |
+
return pn.widgets.tables.NumberFormatter(format="0")
|
14 |
+
elif format_str == "%.1f":
|
15 |
+
return pn.widgets.tables.NumberFormatter(format="0.0")
|
16 |
+
elif format_str == "%.2f":
|
17 |
+
return pn.widgets.tables.NumberFormatter(format="0.00")
|
18 |
+
elif format_str == "%.4f":
|
19 |
+
return pn.widgets.tables.NumberFormatter(format="0.0000")
|
20 |
+
elif format_str == "$%.02f":
|
21 |
+
return pn.widgets.tables.NumberFormatter(format="$0,0.00")
|
22 |
+
return format_str
|