Spaces:
Sleeping
Sleeping
Update
Browse files
external/RobotHub-TransportServer
CHANGED
@@ -1 +1 @@
|
|
1 |
-
Subproject commit
|
|
|
1 |
+
Subproject commit 1395b219fcece1be0d956622036db00fbae840af
|
launch_simple.py
CHANGED
@@ -30,7 +30,7 @@ if __name__ == "__main__":
|
|
30 |
parser = argparse.ArgumentParser(
|
31 |
description="Launch integrated RobotHub Inference Server with FastAPI + Gradio"
|
32 |
)
|
33 |
-
parser.add_argument("--host", default="
|
34 |
parser.add_argument("--port", type=int, default=7860, help="Port to bind to")
|
35 |
parser.add_argument(
|
36 |
"--share", action="store_true", help="Create public Gradio link"
|
|
|
30 |
parser = argparse.ArgumentParser(
|
31 |
description="Launch integrated RobotHub Inference Server with FastAPI + Gradio"
|
32 |
)
|
33 |
+
parser.add_argument("--host", default="0.0.0.0", help="Host to bind to")
|
34 |
parser.add_argument("--port", type=int, default=7860, help="Port to bind to")
|
35 |
parser.add_argument(
|
36 |
"--share", action="store_true", help="Create public Gradio link"
|
src/inference_server/cli.py
CHANGED
@@ -20,7 +20,7 @@ def setup_logging(debug: bool = False):
|
|
20 |
)
|
21 |
|
22 |
|
23 |
-
def launch_server_only(host: str = "
|
24 |
"""Launch only the AI server."""
|
25 |
print(f"🚀 Starting RobotHub Inference Server on {host}:{port}")
|
26 |
uvicorn.run(
|
@@ -33,7 +33,7 @@ def launch_server_only(host: str = "localhost", port: int = 8001, reload: bool =
|
|
33 |
|
34 |
|
35 |
def launch_integrated_app(
|
36 |
-
host: str = "
|
37 |
):
|
38 |
"""Launch the integrated app (UI + Server)."""
|
39 |
print(f"🎨 Starting Integrated RobotHub App on {host}:{port}")
|
@@ -76,7 +76,7 @@ Examples:
|
|
76 |
|
77 |
# Server configuration
|
78 |
parser.add_argument(
|
79 |
-
"--server-host", default="
|
80 |
)
|
81 |
parser.add_argument(
|
82 |
"--server-port", type=int, default=8001, help="AI server port (default: 8001)"
|
@@ -87,7 +87,7 @@ Examples:
|
|
87 |
|
88 |
# App configuration
|
89 |
parser.add_argument(
|
90 |
-
"--host", default="
|
91 |
)
|
92 |
parser.add_argument(
|
93 |
"--port", type=int, default=7860, help="App port (default: 7860)"
|
|
|
20 |
)
|
21 |
|
22 |
|
23 |
+
def launch_server_only(host: str = "0.0.0.0", port: int = 8001, reload: bool = True):
|
24 |
"""Launch only the AI server."""
|
25 |
print(f"🚀 Starting RobotHub Inference Server on {host}:{port}")
|
26 |
uvicorn.run(
|
|
|
33 |
|
34 |
|
35 |
def launch_integrated_app(
|
36 |
+
host: str = "0.0.0.0", port: int = 7860, share: bool = False, debug: bool = False
|
37 |
):
|
38 |
"""Launch the integrated app (UI + Server)."""
|
39 |
print(f"🎨 Starting Integrated RobotHub App on {host}:{port}")
|
|
|
76 |
|
77 |
# Server configuration
|
78 |
parser.add_argument(
|
79 |
+
"--server-host", default="0.0.0.0", help="AI server host (default: localhost)"
|
80 |
)
|
81 |
parser.add_argument(
|
82 |
"--server-port", type=int, default=8001, help="AI server port (default: 8001)"
|
|
|
87 |
|
88 |
# App configuration
|
89 |
parser.add_argument(
|
90 |
+
"--host", default="0.0.0.0", help="App host (default: localhost)"
|
91 |
)
|
92 |
parser.add_argument(
|
93 |
"--port", type=int, default=7860, help="App port (default: 7860)"
|
src/inference_server/main.py
CHANGED
@@ -190,7 +190,7 @@ if __name__ == "__main__":
|
|
190 |
port = int(os.environ.get("PORT", "8001"))
|
191 |
uvicorn.run(
|
192 |
"inference_server.main:app",
|
193 |
-
host="
|
194 |
port=port,
|
195 |
reload=False,
|
196 |
log_level="info",
|
|
|
190 |
port = int(os.environ.get("PORT", "8001"))
|
191 |
uvicorn.run(
|
192 |
"inference_server.main:app",
|
193 |
+
host="0.0.0.0",
|
194 |
port=port,
|
195 |
reload=False,
|
196 |
log_level="info",
|
src/inference_server/simple_integrated.py
CHANGED
@@ -37,7 +37,7 @@ def start_api_server_thread(port: int = 8001):
|
|
37 |
def run_server():
|
38 |
global server_started
|
39 |
logger.info(f"Starting AI server on port {port}")
|
40 |
-
uvicorn.run(fastapi_app, host="
|
41 |
server_started = False
|
42 |
|
43 |
server_thread = threading.Thread(target=run_server, daemon=True)
|
@@ -407,7 +407,7 @@ class ServerManagement:
|
|
407 |
|
408 |
|
409 |
def launch_simple_integrated_app(
|
410 |
-
host: str = "
|
411 |
port: int = DEFAULT_PORT,
|
412 |
share: bool = False,
|
413 |
transport_server_url: str = DEFAULT_TRANSPORT_SERVER_URL,
|
|
|
37 |
def run_server():
|
38 |
global server_started
|
39 |
logger.info(f"Starting AI server on port {port}")
|
40 |
+
uvicorn.run(fastapi_app, host="0.0.0.0", port=port, log_level="warning")
|
41 |
server_started = False
|
42 |
|
43 |
server_thread = threading.Thread(target=run_server, daemon=True)
|
|
|
407 |
|
408 |
|
409 |
def launch_simple_integrated_app(
|
410 |
+
host: str = "0.0.0.0",
|
411 |
port: int = DEFAULT_PORT,
|
412 |
share: bool = False,
|
413 |
transport_server_url: str = DEFAULT_TRANSPORT_SERVER_URL,
|