File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,6 @@ if run_ui_locally:
53
53
serve_cmd = " && " .join ([
54
54
"source {}/bin/activate" .format (venv_name ),
55
55
"cd chart/web-app" ,
56
- "python3 app.py {}" .format (hf_model ),
56
+ "python3 app.py {} localhost " .format (hf_model ),
57
57
])
58
58
)
Original file line number Diff line number Diff line change @@ -174,5 +174,9 @@ def inference_wrapper(*args):
174
174
css = css_overrides ,
175
175
) as app :
176
176
logger .debug ("Gradio chat interface config: %s" , app .config )
177
- # app.launch(server_name="0.0.0.0") # Do we need this for k8s service?
178
- app .launch ()
177
+ # For running locally in tilt dev setup
178
+ if len (sys .argv ) > 2 and sys .argv [2 ] == "localhost" :
179
+ app .launch ()
180
+ # For running on cluster
181
+ else :
182
+ app .launch (server_name = "0.0.0.0" )
You can’t perform that action at this time.
0 commit comments