Spaces:
Running
Running
Download data/__init__.py from Ramos-Ramos/npb_data_app: direct link, hf CLI and curl.
- Browser
- Download file 239 Bytes
-
https://huggingface.co/spaces/Ramos-Ramos/npb_data_app/resolve/main/data/__init__.py
- Command line
-
hf download hf://spaces/Ramos-Ramos/npb_data_app/data/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/Ramos-Ramos/npb_data_app/resolve/main/data/__init__.py
239 Bytes
| import os | |
| import polars as pl | |
| from .seasons import SEASONS | |
| assert (USE_CACHE := os.getenv('USE_CACHE', 'False')) in ('True', 'False') | |
| if USE_CACHE == 'True': | |
| data_df = pl.read_parquet('data.parquet') | |
| else: | |
| from .data import data_df | |