Spaces:
Sleeping
Sleeping
[Fix] Remove deployment code made for JZ
Browse files
app.py
CHANGED
@@ -265,18 +265,7 @@ with gr.Blocks(title=title, css=custom_css) as interface:
|
|
265 |
model_b_placeholder,
|
266 |
physics_placeholder,
|
267 |
use_generator_button,
|
268 |
-
metrics_placeholder],
|
269 |
outputs=[idx_slider, clean, y_image, model_a_out, model_b_out, physics_params, y_metrics, out_a_metric, out_b_metric])
|
270 |
|
271 |
-
|
272 |
-
"""Launch Gradio on JupyterHub."""
|
273 |
-
server = "https://jupyterhub.idris.fr"
|
274 |
-
port = random.randint(1111, 2222) # need to set a new port for each instance of gradio on the same machine
|
275 |
-
root_path = f'{os.environ["JUPYTERHUB_SERVICE_PREFIX"]}proxy/{port}/'
|
276 |
-
print("Gradio Interface available on :", server + root_path)
|
277 |
-
gradio_interface.launch(
|
278 |
-
root_path=root_path,
|
279 |
-
server_port=port,
|
280 |
-
)
|
281 |
-
|
282 |
-
launch_gradio(interface)
|
|
|
265 |
model_b_placeholder,
|
266 |
physics_placeholder,
|
267 |
use_generator_button,
|
268 |
+
metrics_placeholder],
|
269 |
outputs=[idx_slider, clean, y_image, model_a_out, model_b_out, physics_params, y_metrics, out_a_metric, out_b_metric])
|
270 |
|
271 |
+
interface.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|