Spaces:
Sleeping
Sleeping
Ajit Panday commited on
Commit ·
e01759c
1
Parent(s): ddecf13
Fix auth router import in main.py
Browse files
main.py
CHANGED
|
@@ -15,7 +15,7 @@ from app.settings import (
|
|
| 15 |
SUMMARIZER_MODEL, SENTIMENT_MODEL
|
| 16 |
)
|
| 17 |
from app.models import Customer, CallRecord
|
| 18 |
-
from app.auth import verify_api_key, get_current_admin, create_access_token
|
| 19 |
from sqlalchemy.orm import sessionmaker
|
| 20 |
from fastapi.security import OAuth2PasswordRequestForm
|
| 21 |
|
|
@@ -44,7 +44,7 @@ summarizer = pipeline("summarization", model=SUMMARIZER_MODEL)
|
|
| 44 |
sentiment_analyzer = pipeline("sentiment-analysis", model=SENTIMENT_MODEL)
|
| 45 |
|
| 46 |
# Include auth router
|
| 47 |
-
app.include_router(
|
| 48 |
|
| 49 |
async def get_customer_by_api_key(api_key: str = Header(...), db: Session = Depends(Customer.get_db)):
|
| 50 |
customer = db.query(Customer).filter(
|
|
|
|
| 15 |
SUMMARIZER_MODEL, SENTIMENT_MODEL
|
| 16 |
)
|
| 17 |
from app.models import Customer, CallRecord
|
| 18 |
+
from app.auth import verify_api_key, get_current_admin, create_access_token, router as auth_router
|
| 19 |
from sqlalchemy.orm import sessionmaker
|
| 20 |
from fastapi.security import OAuth2PasswordRequestForm
|
| 21 |
|
|
|
|
| 44 |
sentiment_analyzer = pipeline("sentiment-analysis", model=SENTIMENT_MODEL)
|
| 45 |
|
| 46 |
# Include auth router
|
| 47 |
+
app.include_router(auth_router, prefix="/api/v1", tags=["auth"])
|
| 48 |
|
| 49 |
async def get_customer_by_api_key(api_key: str = Header(...), db: Session = Depends(Customer.get_db)):
|
| 50 |
customer = db.query(Customer).filter(
|