Spaces:
Running on Zero
Running on Zero
Configure Hugging Face Gradio Space deployment with app.py and packages.txt
Browse files- README.md +11 -0
- app.py +17 -0
- packages.txt +13 -0
- requirements.txt +1 -0
README.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# 🧠 DOOM-FlyWire: 139,248-Neuron Biological Connectome Autonomous Agent & In Silico Neuro-Sandbox
|
| 2 |
|
| 3 |
[-00f5d4.svg)](https://flywire.ai)
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: DOOM-FlyWire Connectome
|
| 3 |
+
emoji: 🪰
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: green
|
| 6 |
+
sdk: gradio
|
| 7 |
+
app_file: app.py
|
| 8 |
+
pinned: false
|
| 9 |
+
license: mit
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
# 🧠 DOOM-FlyWire: 139,248-Neuron Biological Connectome Autonomous Agent & In Silico Neuro-Sandbox
|
| 13 |
|
| 14 |
[-00f5d4.svg)](https://flywire.ai)
|
app.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
import gradio as gr
|
| 3 |
+
import uvicorn
|
| 4 |
+
from server import app as fastapi_app
|
| 5 |
+
|
| 6 |
+
# Mount Gradio Blocks for Hugging Face SDK healthcheck compatibility
|
| 7 |
+
demo = gr.Blocks(title="DOOM-FlyWire Connectome")
|
| 8 |
+
with demo:
|
| 9 |
+
gr.HTML("<script>if (window.location.pathname.startsWith('/gradio')) { window.location.href = '/'; }</script>")
|
| 10 |
+
|
| 11 |
+
# Combine FastAPI and Gradio
|
| 12 |
+
app = gr.mount_gradio_app(fastapi_app, demo, path="/gradio")
|
| 13 |
+
|
| 14 |
+
if __name__ == "__main__":
|
| 15 |
+
port = int(os.environ.get("PORT", 7860))
|
| 16 |
+
print(f"[Hugging Face Space] Launching DOOM-FlyWire on 0.0.0.0:{port}...")
|
| 17 |
+
uvicorn.run("app:app", host="0.0.0.0", port=port, reload=False)
|
packages.txt
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
build-essential
|
| 2 |
+
cmake
|
| 3 |
+
libboost-all-dev
|
| 4 |
+
libsdl2-dev
|
| 5 |
+
libopenal-dev
|
| 6 |
+
zlib1g-dev
|
| 7 |
+
libbz2-dev
|
| 8 |
+
libjpeg-dev
|
| 9 |
+
libfluidsynth-dev
|
| 10 |
+
libgme-dev
|
| 11 |
+
libgl1
|
| 12 |
+
libglib2.0-0
|
| 13 |
+
libgomp1
|
requirements.txt
CHANGED
|
@@ -13,3 +13,4 @@ fastapi>=0.100.0
|
|
| 13 |
uvicorn>=0.22.0
|
| 14 |
websockets>=11.0
|
| 15 |
tqdm>=4.65.0
|
|
|
|
|
|
| 13 |
uvicorn>=0.22.0
|
| 14 |
websockets>=11.0
|
| 15 |
tqdm>=4.65.0
|
| 16 |
+
gradio>=4.0.0
|