Spaces:
Build error
Build error
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +3 -1
src/streamlit_app.py
CHANGED
|
@@ -17,6 +17,8 @@ import plotly.graph_objects as go
|
|
| 17 |
|
| 18 |
# point Streamlit at a writable folder
|
| 19 |
os.environ["STREAMLIT_CONFIG_DIR"] = "/tmp/.streamlit"
|
|
|
|
|
|
|
| 20 |
Path(os.environ["STREAMLIT_CONFIG_DIR"]).mkdir(parents=True, exist_ok=True)
|
| 21 |
|
| 22 |
|
|
@@ -285,7 +287,7 @@ counts = (
|
|
| 285 |
top5_per_region = (
|
| 286 |
counts
|
| 287 |
.groupby('RegionName', group_keys=False)
|
| 288 |
-
.apply(lambda grp: grp.nlargest(5, 'Count'))
|
| 289 |
)
|
| 290 |
|
| 291 |
# 3. Draw a stacked bar chart
|
|
|
|
| 17 |
|
| 18 |
# point Streamlit at a writable folder
|
| 19 |
os.environ["STREAMLIT_CONFIG_DIR"] = "/tmp/.streamlit"
|
| 20 |
+
os.environ["XDG_CONFIG_HOME"] = "/tmp/.config"
|
| 21 |
+
os.environ["MPLCONFIGDIR"] = "/tmp/matplotlib"
|
| 22 |
Path(os.environ["STREAMLIT_CONFIG_DIR"]).mkdir(parents=True, exist_ok=True)
|
| 23 |
|
| 24 |
|
|
|
|
| 287 |
top5_per_region = (
|
| 288 |
counts
|
| 289 |
.groupby('RegionName', group_keys=False)
|
| 290 |
+
.apply(lambda grp: grp.nlargest(5, 'Count'), include_group=False)
|
| 291 |
)
|
| 292 |
|
| 293 |
# 3. Draw a stacked bar chart
|