PlayerBPlaytime
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -119,23 +119,5 @@ def launch_gradio(port):
|
|
119 |
|
120 |
|
121 |
if __name__ == "__main__":
|
122 |
-
|
123 |
-
|
124 |
-
port_index = sys.argv.index("--port") + 1
|
125 |
-
if port_index < len(sys.argv):
|
126 |
-
port = int(sys.argv[port_index])
|
127 |
-
|
128 |
-
launch_gradio(port)
|
129 |
-
|
130 |
-
else:
|
131 |
-
# if launch fails, decrement port number and try again (up to 10 times)
|
132 |
-
for i in range(10):
|
133 |
-
try:
|
134 |
-
launch_gradio(port)
|
135 |
-
break
|
136 |
-
except OSError:
|
137 |
-
print("Failed to launch on port", port, "- trying again...")
|
138 |
-
port -= 1
|
139 |
-
except Exception as error:
|
140 |
-
print(f"An error occurred launching Gradio: {error}")
|
141 |
-
break
|
|
|
119 |
|
120 |
|
121 |
if __name__ == "__main__":
|
122 |
+
Applio.launch()
|
123 |
+
# share=True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|