Update app.py
Browse files
app.py
CHANGED
@@ -267,11 +267,20 @@ with gr.Blocks(css_paths="app.css") as demo:
|
|
267 |
|
268 |
|
269 |
if __name__ == "__main__":
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
|
268 |
|
269 |
if __name__ == "__main__":
|
270 |
+
try:
|
271 |
+
interface = gr.Interface(
|
272 |
+
css_paths="app.css",
|
273 |
+
blocks=demo
|
274 |
+
)
|
275 |
+
interface.launch(
|
276 |
+
server_name="0.0.0.0",
|
277 |
+
server_port=7860,
|
278 |
+
share=False
|
279 |
+
)
|
280 |
+
except AttributeError:
|
281 |
+
# 대체 실행 방법
|
282 |
+
demo = gr.Blocks(css_paths="app.css")
|
283 |
+
demo.launch(
|
284 |
+
server_port=7860,
|
285 |
+
share=False
|
286 |
+
)
|