seawolf2357 commited on
Commit
596d375
·
verified ·
1 Parent(s): ba98e75

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -8
app.py CHANGED
@@ -267,11 +267,20 @@ with gr.Blocks(css_paths="app.css") as demo:
267
 
268
 
269
  if __name__ == "__main__":
270
- demo = gr.Blocks(css_paths="app.css")
271
- demo.launch(
272
- server_name="0.0.0.0",
273
- server_port=7860,
274
- share=False,
275
- show_error=True,
276
- ssr_mode=False
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
+ )