Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,8 @@
|
|
1 |
import gradio as gr
|
2 |
from query_data import main # Importing the main function from query_data.py
|
3 |
import os
|
|
|
|
|
4 |
|
5 |
#enviroment variables
|
6 |
os.environ['DISABLE_NEST_ASYNCIO'] = 'True'
|
@@ -8,6 +10,7 @@ os.environ['DISABLE_NEST_ASYNCIO'] = 'True'
|
|
8 |
|
9 |
def run_app(query_text):
|
10 |
# Call the main function from query_data.py
|
|
|
11 |
response_text = main(query_text)
|
12 |
return response_text
|
13 |
|
|
|
1 |
import gradio as gr
|
2 |
from query_data import main # Importing the main function from query_data.py
|
3 |
import os
|
4 |
+
import subprocess
|
5 |
+
|
6 |
|
7 |
#enviroment variables
|
8 |
os.environ['DISABLE_NEST_ASYNCIO'] = 'True'
|
|
|
10 |
|
11 |
def run_app(query_text):
|
12 |
# Call the main function from query_data.py
|
13 |
+
subprocess.run(["pip", "uninstall", "-y", 'uvloop'])
|
14 |
response_text = main(query_text)
|
15 |
return response_text
|
16 |
|