Spaces:
Running
Running
abadesalex
commited on
Commit
•
4a02f65
1
Parent(s):
e747604
midelware hhtps
Browse files- Api/app/main.py +8 -12
Api/app/main.py
CHANGED
@@ -1,21 +1,18 @@
|
|
1 |
import logging
|
2 |
from contextlib import asynccontextmanager
|
3 |
|
4 |
-
from app.modules.clearVariables.routes.clearVariables_route import
|
5 |
-
router as clear_variables_routes
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
from app.modules.querySearch.routes.querySearch_route import (
|
11 |
-
router as query_search_routes,
|
12 |
-
)
|
13 |
from fastapi import APIRouter, FastAPI
|
14 |
from fastapi.middleware.cors import CORSMiddleware
|
15 |
-
from fastapi.middleware.httpsredirect import HTTPSRedirectMiddleware
|
16 |
from fastapi.responses import FileResponse
|
17 |
from fastapi.staticfiles import StaticFiles
|
18 |
-
from transformers import AutoModel, AutoModelForMaskedLM, AutoTokenizer,
|
|
|
19 |
|
20 |
|
21 |
@asynccontextmanager
|
@@ -60,7 +57,6 @@ app.add_middleware(
|
|
60 |
allow_headers=["*"],
|
61 |
)
|
62 |
|
63 |
-
app.add_middleware(HTTPSRedirectMiddleware)
|
64 |
|
65 |
app_router = APIRouter(prefix="/api")
|
66 |
app_router.include_router(upload_file_routes, prefix="/document", tags=["document"])
|
|
|
1 |
import logging
|
2 |
from contextlib import asynccontextmanager
|
3 |
|
4 |
+
from app.modules.clearVariables.routes.clearVariables_route import \
|
5 |
+
router as clear_variables_routes
|
6 |
+
from app.modules.documentHandeler.routes.document_handeler_route import \
|
7 |
+
router as upload_file_routes
|
8 |
+
from app.modules.querySearch.routes.querySearch_route import \
|
9 |
+
router as query_search_routes
|
|
|
|
|
|
|
10 |
from fastapi import APIRouter, FastAPI
|
11 |
from fastapi.middleware.cors import CORSMiddleware
|
|
|
12 |
from fastapi.responses import FileResponse
|
13 |
from fastapi.staticfiles import StaticFiles
|
14 |
+
from transformers import (AutoModel, AutoModelForMaskedLM, AutoTokenizer,
|
15 |
+
pipeline)
|
16 |
|
17 |
|
18 |
@asynccontextmanager
|
|
|
57 |
allow_headers=["*"],
|
58 |
)
|
59 |
|
|
|
60 |
|
61 |
app_router = APIRouter(prefix="/api")
|
62 |
app_router.include_router(upload_file_routes, prefix="/document", tags=["document"])
|