Spaces:
Running
Running
feat: add spin checkbox
Browse files
app.py
CHANGED
@@ -160,6 +160,7 @@ def load_result() -> Optional[AlphaFoldData]:
|
|
160 |
@solara.component
|
161 |
def Page():
|
162 |
color_mode = solara.use_reactive("chain")
|
|
|
163 |
dark_effective = solara.lab.use_dark_effective()
|
164 |
|
165 |
def on_color_mode(value: str):
|
@@ -198,6 +199,7 @@ def Page():
|
|
198 |
on_value=on_color_mode,
|
199 |
disabled=disabled,
|
200 |
)
|
|
|
201 |
|
202 |
def write_atoms():
|
203 |
return load_result.value.atom_data.write_csv()
|
@@ -256,6 +258,7 @@ def Page():
|
|
256 |
color_data=color_data,
|
257 |
tooltips=tooltip_data,
|
258 |
show_water=False,
|
|
|
259 |
theme=theme,
|
260 |
).key(f"pdbemolstar-{dark_effective}")
|
261 |
|
|
|
160 |
@solara.component
|
161 |
def Page():
|
162 |
color_mode = solara.use_reactive("chain")
|
163 |
+
spin = solara.use_reactive(True)
|
164 |
dark_effective = solara.lab.use_dark_effective()
|
165 |
|
166 |
def on_color_mode(value: str):
|
|
|
199 |
on_value=on_color_mode,
|
200 |
disabled=disabled,
|
201 |
)
|
202 |
+
solara.Checkbox(label="Spin", value=spin)
|
203 |
|
204 |
def write_atoms():
|
205 |
return load_result.value.atom_data.write_csv()
|
|
|
258 |
color_data=color_data,
|
259 |
tooltips=tooltip_data,
|
260 |
show_water=False,
|
261 |
+
spin=spin.value,
|
262 |
theme=theme,
|
263 |
).key(f"pdbemolstar-{dark_effective}")
|
264 |
|