Spaces:
Running
Running
BioOps Team commited on
Commit ·
c36be96
1
Parent(s): 910fad0
fix: move theme/css to gr.Blocks() constructor + add Chatbot type='messages'
Browse filesFixes HF Spaces crash: TypeError: Blocks.launch() got unexpected keyword argument 'theme'
Also resolves Chatbot deprecation warning for tuples format.
- app.py +1 -7
- bioops/simulation_ui/dashboard.py +3 -0
- main.py +1 -7
app.py
CHANGED
|
@@ -30,11 +30,7 @@ logger = logging.getLogger("bioops_twin")
|
|
| 30 |
|
| 31 |
def main() -> None:
|
| 32 |
"""Build and launch the BioOps Twin dashboard."""
|
| 33 |
-
from bioops.simulation_ui.dashboard import
|
| 34 |
-
INDUSTRIAL_CSS,
|
| 35 |
-
INDUSTRIAL_THEME,
|
| 36 |
-
build_dashboard,
|
| 37 |
-
)
|
| 38 |
|
| 39 |
logger.info("Launching BioOps Twin dashboard...")
|
| 40 |
app = build_dashboard()
|
|
@@ -42,8 +38,6 @@ def main() -> None:
|
|
| 42 |
server_name="0.0.0.0",
|
| 43 |
server_port=7860,
|
| 44 |
show_error=True,
|
| 45 |
-
theme=INDUSTRIAL_THEME,
|
| 46 |
-
css=INDUSTRIAL_CSS,
|
| 47 |
)
|
| 48 |
|
| 49 |
|
|
|
|
| 30 |
|
| 31 |
def main() -> None:
|
| 32 |
"""Build and launch the BioOps Twin dashboard."""
|
| 33 |
+
from bioops.simulation_ui.dashboard import build_dashboard
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
logger.info("Launching BioOps Twin dashboard...")
|
| 36 |
app = build_dashboard()
|
|
|
|
| 38 |
server_name="0.0.0.0",
|
| 39 |
server_port=7860,
|
| 40 |
show_error=True,
|
|
|
|
|
|
|
| 41 |
)
|
| 42 |
|
| 43 |
|
bioops/simulation_ui/dashboard.py
CHANGED
|
@@ -216,6 +216,8 @@ def build_dashboard() -> gr.Blocks:
|
|
| 216 |
# -- Build UI ----------------------------------------------------------
|
| 217 |
with gr.Blocks(
|
| 218 |
title="BioOps Twin — Digital Centrifuge",
|
|
|
|
|
|
|
| 219 |
) as demo:
|
| 220 |
|
| 221 |
# -- Header ---------------------------------------------------------
|
|
@@ -245,6 +247,7 @@ def build_dashboard() -> gr.Blocks:
|
|
| 245 |
value=[],
|
| 246 |
label="BioOps Assistant",
|
| 247 |
elem_id="operator-chatbot",
|
|
|
|
| 248 |
height=340,
|
| 249 |
placeholder=(
|
| 250 |
"Talk to BioOps — try:\n"
|
|
|
|
| 216 |
# -- Build UI ----------------------------------------------------------
|
| 217 |
with gr.Blocks(
|
| 218 |
title="BioOps Twin — Digital Centrifuge",
|
| 219 |
+
theme=INDUSTRIAL_THEME,
|
| 220 |
+
css=INDUSTRIAL_CSS,
|
| 221 |
) as demo:
|
| 222 |
|
| 223 |
# -- Header ---------------------------------------------------------
|
|
|
|
| 247 |
value=[],
|
| 248 |
label="BioOps Assistant",
|
| 249 |
elem_id="operator-chatbot",
|
| 250 |
+
type="messages",
|
| 251 |
height=340,
|
| 252 |
placeholder=(
|
| 253 |
"Talk to BioOps — try:\n"
|
main.py
CHANGED
|
@@ -30,11 +30,7 @@ logger = logging.getLogger("bioops_twin")
|
|
| 30 |
|
| 31 |
def main() -> None:
|
| 32 |
"""Build and launch the BioOps Twin dashboard."""
|
| 33 |
-
from bioops.simulation_ui.dashboard import
|
| 34 |
-
INDUSTRIAL_CSS,
|
| 35 |
-
INDUSTRIAL_THEME,
|
| 36 |
-
build_dashboard,
|
| 37 |
-
)
|
| 38 |
|
| 39 |
logger.info("Launching BioOps Twin dashboard...")
|
| 40 |
app = build_dashboard()
|
|
@@ -42,8 +38,6 @@ def main() -> None:
|
|
| 42 |
server_name="0.0.0.0",
|
| 43 |
server_port=7860,
|
| 44 |
show_error=True,
|
| 45 |
-
theme=INDUSTRIAL_THEME,
|
| 46 |
-
css=INDUSTRIAL_CSS,
|
| 47 |
)
|
| 48 |
|
| 49 |
|
|
|
|
| 30 |
|
| 31 |
def main() -> None:
|
| 32 |
"""Build and launch the BioOps Twin dashboard."""
|
| 33 |
+
from bioops.simulation_ui.dashboard import build_dashboard
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
|
| 35 |
logger.info("Launching BioOps Twin dashboard...")
|
| 36 |
app = build_dashboard()
|
|
|
|
| 38 |
server_name="0.0.0.0",
|
| 39 |
server_port=7860,
|
| 40 |
show_error=True,
|
|
|
|
|
|
|
| 41 |
)
|
| 42 |
|
| 43 |
|