Download components/browser_time.py from HansTran/TESTING: direct link, hf CLI and curl.
- Browser
- Download file 400 Bytes
-
https://huggingface.co/spaces/HansTran/TESTING/resolve/main/components/browser_time.py
- Command line
-
hf download hf://spaces/HansTran/TESTING/components/browser_time.py
-
curl -L -o browser_time.py https://huggingface.co/spaces/HansTran/TESTING/resolve/main/components/browser_time.py
400 Bytes
| from pathlib import Path | |
| import streamlit.components.v1 as components | |
| _COMPONENT_DIR = Path(__file__).resolve().parent / "browser_time_component" | |
| _browser_time_component = components.declare_component( | |
| "browser_time_component", | |
| path=str(_COMPONENT_DIR), | |
| ) | |
| def get_browser_time(key: str = "browser_time_component") -> str | None: | |
| return _browser_time_component(key=key, default=None) | |