Spaces:
Sleeping
Sleeping
Update run_app.py
Browse files- run_app.py +2 -2
run_app.py
CHANGED
@@ -23,7 +23,7 @@ from g4f.cookies import read_cookie_files
|
|
23 |
|
24 |
def create_app():
|
25 |
app = FastAPI()
|
26 |
-
api =
|
27 |
api.register_routes()
|
28 |
api.register_authorization()
|
29 |
api.register_validation_exception_handler()
|
@@ -58,7 +58,7 @@ class AppConfig():
|
|
58 |
for key, value in data.items():
|
59 |
setattr(cls, key, value)
|
60 |
|
61 |
-
class
|
62 |
def __init__(self, app: FastAPI) -> None:
|
63 |
self.app = app
|
64 |
self.client = AsyncClient()
|
|
|
23 |
|
24 |
def create_app():
|
25 |
app = FastAPI()
|
26 |
+
api = Api2(app)
|
27 |
api.register_routes()
|
28 |
api.register_authorization()
|
29 |
api.register_validation_exception_handler()
|
|
|
58 |
for key, value in data.items():
|
59 |
setattr(cls, key, value)
|
60 |
|
61 |
+
class Api2:
|
62 |
def __init__(self, app: FastAPI) -> None:
|
63 |
self.app = app
|
64 |
self.client = AsyncClient()
|