Spaces:
Runtime error
Runtime error
Hector Lopez
commited on
Commit
·
84c5052
1
Parent(s):
15acd7c
Implemented port selection
Browse files
app.py
CHANGED
@@ -45,6 +45,7 @@ examples = [
|
|
45 |
]
|
46 |
|
47 |
gr.close_all()
|
|
|
48 |
|
49 |
gr.Interface(
|
50 |
waste_detector_interface,
|
@@ -54,4 +55,4 @@ gr.Interface(
|
|
54 |
description=description,
|
55 |
examples=examples,
|
56 |
theme="huggingface",
|
57 |
-
).launch()
|
|
|
45 |
]
|
46 |
|
47 |
gr.close_all()
|
48 |
+
port = gr.networking.networking.get_first_available_port(1000, 9000)
|
49 |
|
50 |
gr.Interface(
|
51 |
waste_detector_interface,
|
|
|
55 |
description=description,
|
56 |
examples=examples,
|
57 |
theme="huggingface",
|
58 |
+
).launch(server_port=port)
|