Spaces:
Running
Running
Update main.py
Browse files
main.py
CHANGED
@@ -30,6 +30,7 @@ import io
|
|
30 |
import string
|
31 |
import openai
|
32 |
from io import BytesIO
|
|
|
33 |
from datetime import datetime as dt
|
34 |
from dotenv import load_dotenv
|
35 |
from bs4 import BeautifulSoup
|
@@ -1577,5 +1578,5 @@ def custom_openapi():
|
|
1577 |
return app.openapi_schema
|
1578 |
|
1579 |
app.openapi = custom_openapi
|
1580 |
-
|
1581 |
-
app.add_exception_handler(HTTPException, custom_exception_handler)
|
|
|
30 |
import string
|
31 |
import openai
|
32 |
from io import BytesIO
|
33 |
+
import nest_asyncio
|
34 |
from datetime import datetime as dt
|
35 |
from dotenv import load_dotenv
|
36 |
from bs4 import BeautifulSoup
|
|
|
1578 |
return app.openapi_schema
|
1579 |
|
1580 |
app.openapi = custom_openapi
|
1581 |
+
nest_asyncio.apply()
|
1582 |
+
app.add_exception_handler(HTTPException, custom_exception_handler)
|