Spaces:
Runtime error
Runtime error
Benjamin Bossan
commited on
Commit
•
00bfdf9
1
Parent(s):
31a1df6
Improve layout
Browse files
edit.py
CHANGED
@@ -232,7 +232,7 @@ def edit_input_form():
|
|
232 |
st.session_state.task_state = TaskState()
|
233 |
|
234 |
with st.sidebar:
|
235 |
-
col_0, col_1, col_2,
|
236 |
undo_disabled = not bool(st.session_state.task_state.done_list)
|
237 |
redo_disabled = not bool(st.session_state.task_state.undone_list)
|
238 |
with col_0:
|
@@ -243,9 +243,11 @@ def edit_input_form():
|
|
243 |
st.button(name, on_click=redo_last, disabled=redo_disabled)
|
244 |
with col_2:
|
245 |
st.button("Reset", on_click=reset_model_card)
|
246 |
-
|
|
|
|
|
247 |
add_download_model_card_button()
|
248 |
-
with
|
249 |
st.button("Delete", on_click=delete_model_card)
|
250 |
|
251 |
if "model_card" in st.session_state:
|
|
|
232 |
st.session_state.task_state = TaskState()
|
233 |
|
234 |
with st.sidebar:
|
235 |
+
col_0, col_1, col_2, *_ = st.columns([2, 2, 2, 2])
|
236 |
undo_disabled = not bool(st.session_state.task_state.done_list)
|
237 |
redo_disabled = not bool(st.session_state.task_state.undone_list)
|
238 |
with col_0:
|
|
|
243 |
st.button(name, on_click=redo_last, disabled=redo_disabled)
|
244 |
with col_2:
|
245 |
st.button("Reset", on_click=reset_model_card)
|
246 |
+
|
247 |
+
col_0, col_1, *_ = st.columns([2, 2, 2, 2])
|
248 |
+
with col_0:
|
249 |
add_download_model_card_button()
|
250 |
+
with col_1:
|
251 |
st.button("Delete", on_click=delete_model_card)
|
252 |
|
253 |
if "model_card" in st.session_state:
|
start.py
CHANGED
@@ -21,12 +21,12 @@ hf_path = Path(mkdtemp(prefix="skops-")) # hf repo
|
|
21 |
tmp_path = Path(mkdtemp(prefix="skops-")) # temporary files
|
22 |
description = """Create an sklearn model card
|
23 |
|
24 |
-
This Hugging Face Space that aims to provide a simple interface to use the
|
|
|
25 |
|
26 |
"""
|
27 |
|
28 |
|
29 |
-
|
30 |
def load_model() -> None:
|
31 |
if st.session_state.get("model_file") is None:
|
32 |
st.session_state.model = DummyClassifier()
|
|
|
21 |
tmp_path = Path(mkdtemp(prefix="skops-")) # temporary files
|
22 |
description = """Create an sklearn model card
|
23 |
|
24 |
+
This Hugging Face Space that aims to provide a simple interface to use the
|
25 |
+
`skops` model card creation utilities.
|
26 |
|
27 |
"""
|
28 |
|
29 |
|
|
|
30 |
def load_model() -> None:
|
31 |
if st.session_state.get("model_file") is None:
|
32 |
st.session_state.model = DummyClassifier()
|