openfree commited on
Commit
57572ee
1 Parent(s): de7bd5a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -3
app.py CHANGED
@@ -1746,7 +1746,7 @@ def create_main_interface():
1746
  print(f"Error executing code: {str(e)}")
1747
  return None, gr.update(active_key="empty")
1748
 
1749
- with gr.Blocks(css="""
1750
  /* 메인 탭 스타일 */
1751
  .main-tabs > div.tab-nav > button {
1752
  font-size: 1.1em !important;
@@ -1800,7 +1800,9 @@ def create_main_interface():
1800
  border-radius: 8px;
1801
  overflow: hidden;
1802
  }
1803
- """, theme=theme) as demo:
 
 
1804
  with gr.Tabs(elem_classes="main-tabs") as tabs:
1805
  # 갤러리 탭
1806
  with gr.Tab("갤러리", elem_id="gallery-tab"):
@@ -1981,4 +1983,14 @@ def create_main_interface():
1981
  outputs=[deploy_result]
1982
  )
1983
 
1984
- return demo
 
 
 
 
 
 
 
 
 
 
 
1746
  print(f"Error executing code: {str(e)}")
1747
  return None, gr.update(active_key="empty")
1748
 
1749
+ demo = gr.Blocks(css="""
1750
  /* 메인 탭 스타일 */
1751
  .main-tabs > div.tab-nav > button {
1752
  font-size: 1.1em !important;
 
1800
  border-radius: 8px;
1801
  overflow: hidden;
1802
  }
1803
+ """, theme=theme)
1804
+
1805
+ with demo:
1806
  with gr.Tabs(elem_classes="main-tabs") as tabs:
1807
  # 갤러리 탭
1808
  with gr.Tab("갤러리", elem_id="gallery-tab"):
 
1983
  outputs=[deploy_result]
1984
  )
1985
 
1986
+ return demo
1987
+
1988
+ # 메인 실행 부분
1989
+ if __name__ == "__main__":
1990
+ try:
1991
+ demo_instance = Demo() # Demo 인스턴스 생성
1992
+ demo = create_main_interface() # 인터페이스 생성
1993
+ demo.queue(default_concurrency_limit=20).launch(server_name="0.0.0.0", server_port=7860) # 서버 설정 추가
1994
+ except Exception as e:
1995
+ print(f"Initialization error: {e}")
1996
+ raise