Cleo commited on
Commit
6665e72
·
1 Parent(s): e3402df

add nest asyncio

Browse files
Files changed (2) hide show
  1. app.py +4 -0
  2. requirements.txt +1 -0
app.py CHANGED
@@ -1,3 +1,7 @@
 
 
 
 
1
  import gradio as gr
2
  from typing import List, Optional, Tuple, Dict, Any
3
  import uuid
 
1
+ # Enable nested event loops for Gradio + asyncio compatibility
2
+ import nest_asyncio
3
+ nest_asyncio.apply()
4
+
5
  import gradio as gr
6
  from typing import List, Optional, Tuple, Dict, Any
7
  import uuid
requirements.txt CHANGED
@@ -1,5 +1,6 @@
1
  # This file was autogenerated by uv via the following command:
2
  # uv export --no-hashes --no-dev -o app/requirements.txt
 
3
  aiofiles==24.1.0
4
  # via gradio
5
  aiohappyeyeballs==2.6.1
 
1
  # This file was autogenerated by uv via the following command:
2
  # uv export --no-hashes --no-dev -o app/requirements.txt
3
+ nest_asyncio
4
  aiofiles==24.1.0
5
  # via gradio
6
  aiohappyeyeballs==2.6.1