Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files- server/app.py +4 -2
- server/gradio_ui.py +2 -6
server/app.py
CHANGED
|
@@ -56,8 +56,10 @@ app = create_app(
|
|
| 56 |
max_concurrent_envs=1, # increase this number to allow more concurrent WebSocket sessions
|
| 57 |
)
|
| 58 |
|
| 59 |
-
demo
|
| 60 |
-
|
|
|
|
|
|
|
| 61 |
|
| 62 |
|
| 63 |
def serve(host: str = "0.0.0.0", port: int = 8000):
|
|
|
|
| 56 |
max_concurrent_envs=1, # increase this number to allow more concurrent WebSocket sessions
|
| 57 |
)
|
| 58 |
|
| 59 |
+
# Serve the custom analyst UI at both /web and /demo so Hugging Face's
|
| 60 |
+
# default OpenEnv entrypoint and local demo links land on the richer interface.
|
| 61 |
+
app = gr.mount_gradio_app(app, create_demo(), path="/web")
|
| 62 |
+
app = gr.mount_gradio_app(app, create_demo(), path="/demo")
|
| 63 |
|
| 64 |
|
| 65 |
def serve(host: str = "0.0.0.0", port: int = 8000):
|
server/gradio_ui.py
CHANGED
|
@@ -268,11 +268,6 @@ def step_env(
|
|
| 268 |
|
| 269 |
|
| 270 |
def create_demo() -> gr.Blocks:
|
| 271 |
-
theme = gr.themes.Base(
|
| 272 |
-
primary_hue="cyan",
|
| 273 |
-
secondary_hue="blue",
|
| 274 |
-
neutral_hue="slate",
|
| 275 |
-
)
|
| 276 |
css = """
|
| 277 |
.app-shell {max-width: 1440px; margin: 0 auto;}
|
| 278 |
.panel {border: 1px solid rgba(255,255,255,0.08); border-radius: 18px; padding: 14px; background: rgba(8,15,27,0.78);}
|
|
@@ -280,8 +275,9 @@ def create_demo() -> gr.Blocks:
|
|
| 280 |
.hero h1, .hero p {margin: 0;}
|
| 281 |
.hero p {opacity: 0.82; margin-top: 8px;}
|
| 282 |
"""
|
| 283 |
-
with gr.Blocks(title="Network Forensics Analyst Console"
|
| 284 |
with gr.Column(elem_classes=["app-shell"]):
|
|
|
|
| 285 |
gr.Markdown(
|
| 286 |
"""
|
| 287 |
<div class="hero">
|
|
|
|
| 268 |
|
| 269 |
|
| 270 |
def create_demo() -> gr.Blocks:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 271 |
css = """
|
| 272 |
.app-shell {max-width: 1440px; margin: 0 auto;}
|
| 273 |
.panel {border: 1px solid rgba(255,255,255,0.08); border-radius: 18px; padding: 14px; background: rgba(8,15,27,0.78);}
|
|
|
|
| 275 |
.hero h1, .hero p {margin: 0;}
|
| 276 |
.hero p {opacity: 0.82; margin-top: 8px;}
|
| 277 |
"""
|
| 278 |
+
with gr.Blocks(title="Network Forensics Analyst Console") as demo:
|
| 279 |
with gr.Column(elem_classes=["app-shell"]):
|
| 280 |
+
gr.HTML(f"<style>{css}</style>")
|
| 281 |
gr.Markdown(
|
| 282 |
"""
|
| 283 |
<div class="hero">
|