AIencoder commited on
Commit
1317471
·
verified ·
1 Parent(s): d6ab688

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -1
app.py CHANGED
@@ -1,5 +1,12 @@
1
  import gradio as gr
2
  from src.chimera_core import Chimera
 
 
 
 
 
 
 
3
 
4
  # Initialize
5
  try:
@@ -102,4 +109,15 @@ with gr.Blocks(title="Axon God Mode") as demo:
102
  )
103
 
104
  if __name__ == "__main__":
105
- demo.launch(ssr_mode=False, css=custom_css)
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
  from src.chimera_core import Chimera
3
+ import asyncio
4
+ import sys
5
+ import warnings
6
+
7
+ # Suppress the specific asyncio warning for Python 3.13
8
+ if sys.version_info >= (3, 13):
9
+ warnings.filterwarnings('ignore', category=RuntimeWarning, module='asyncio')
10
 
11
  # Initialize
12
  try:
 
109
  )
110
 
111
  if __name__ == "__main__":
112
+ try:
113
+ demo.launch(ssr_mode=False, css=custom_css)
114
+ finally:
115
+ # Clean up event loop on exit
116
+ try:
117
+ loop = asyncio.get_event_loop()
118
+ if loop.is_running():
119
+ loop.stop()
120
+ if not loop.is_closed():
121
+ loop.close()
122
+ except Exception:
123
+ pass