Spaces:
Running
Running
Have a visible disclaimer.
Browse files- app.py +7 -5
- core/state.py +1 -1
- views/splash.py +4 -3
app.py
CHANGED
@@ -56,12 +56,14 @@ def _logout():
|
|
56 |
st.cache_data.clear()
|
57 |
|
58 |
|
59 |
-
if
|
60 |
-
col2.write("\n") # Vertical box to shift the
|
61 |
-
col2.button("
|
|
|
62 |
|
63 |
-
|
64 |
-
col3.
|
|
|
65 |
|
66 |
|
67 |
if st.session_state[CurrentStep] == CurrentStep.splash:
|
|
|
56 |
st.cache_data.clear()
|
57 |
|
58 |
|
59 |
+
if OAUTH_CLIENT_ID:
|
60 |
+
col2.write("\n") # Vertical box to shift the lgout menu
|
61 |
+
col2.button("Log out", on_click=_logout)
|
62 |
+
|
63 |
|
64 |
+
if st.session_state[CurrentStep] != CurrentStep.splash:
|
65 |
+
col3.write("\n") # Vertical box to shift the button menu
|
66 |
+
col3.button("Menu", on_click=_back_to_menu)
|
67 |
|
68 |
|
69 |
if st.session_state[CurrentStep] == CurrentStep.splash:
|
core/state.py
CHANGED
@@ -101,7 +101,7 @@ class CurrentProject:
|
|
101 |
path: epath.Path
|
102 |
|
103 |
@classmethod
|
104 |
-
def create_new(cls) -> CurrentProject:
|
105 |
timestamp = datetime.datetime.now().strftime(PROJECT_FOLDER_PATTERN)
|
106 |
user = get_cached_user()
|
107 |
if user is None and OAUTH_CLIENT_ID:
|
|
|
101 |
path: epath.Path
|
102 |
|
103 |
@classmethod
|
104 |
+
def create_new(cls) -> CurrentProject | None:
|
105 |
timestamp = datetime.datetime.now().strftime(PROJECT_FOLDER_PATTERN)
|
106 |
user = get_cached_user()
|
107 |
if user is None and OAUTH_CLIENT_ID:
|
views/splash.py
CHANGED
@@ -16,9 +16,10 @@ from views.side_buttons import jump_to
|
|
16 |
|
17 |
def render_splash():
|
18 |
if OAUTH_CLIENT_ID:
|
19 |
-
st.
|
20 |
-
"**Disclaimer**: Do not put sensitive information or datasets here.
|
21 |
-
"
|
|
|
22 |
" repository](https://github.com/mlcommons/croissant/tree/main/editor)."
|
23 |
)
|
24 |
col1, col2 = st.columns([1, 1], gap="large")
|
|
|
16 |
|
17 |
def render_splash():
|
18 |
if OAUTH_CLIENT_ID:
|
19 |
+
st.info(
|
20 |
+
"**Disclaimer**: Do not put sensitive information or datasets here. The"
|
21 |
+
" storage on Hugging Face Spaces is ephemeral. If you want to host your own"
|
22 |
+
" version locally, build the app from [the GitHub"
|
23 |
" repository](https://github.com/mlcommons/croissant/tree/main/editor)."
|
24 |
)
|
25 |
col1, col2 = st.columns([1, 1], gap="large")
|