Spaces:
Paused
Paused
Commit
·
e2ebff5
1
Parent(s):
03cbb60
Fix incorrect library download
Browse files- auth/authentication.py +0 -2
- requirements.txt +1 -1
- svc/router.py +5 -6
auth/authentication.py
CHANGED
@@ -3,8 +3,6 @@ from fastapi import HTTPException, Depends
|
|
3 |
from jose import JWTError, jwt
|
4 |
from datetime import datetime, timedelta
|
5 |
|
6 |
-
from svc.schemas import User
|
7 |
-
|
8 |
|
9 |
SECRET_KEY = "llmbenchmark_tr" # your secret key
|
10 |
ALGORITHM = "HS256"
|
|
|
3 |
from jose import JWTError, jwt
|
4 |
from datetime import datetime, timedelta
|
5 |
|
|
|
|
|
6 |
|
7 |
SECRET_KEY = "llmbenchmark_tr" # your secret key
|
8 |
ALGORITHM = "HS256"
|
requirements.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
fastapi
|
2 |
uvicorn[standard]
|
3 |
lm_eval
|
4 |
-
jose
|
|
|
1 |
fastapi
|
2 |
uvicorn[standard]
|
3 |
lm_eval
|
4 |
+
python-jose
|
svc/router.py
CHANGED
@@ -1,19 +1,18 @@
|
|
1 |
-
from fastapi import APIRouter, HTTPException
|
2 |
import logging
|
3 |
|
4 |
from lm_eval import evaluator, utils
|
5 |
from svc.schemas import LMHarnessTaskRequest, LMHarnessTaskResponse, OAuth2PasswordRequestForm, User
|
6 |
-
from
|
7 |
-
from
|
8 |
-
|
9 |
|
10 |
router = APIRouter()
|
11 |
|
12 |
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
|
13 |
logger = logging.getLogger(__name__)
|
14 |
|
15 |
-
|
16 |
-
import os
|
17 |
|
18 |
load_dotenv()
|
19 |
@router.post("/token")
|
|
|
1 |
+
from fastapi import APIRouter, HTTPException, Depends
|
2 |
import logging
|
3 |
|
4 |
from lm_eval import evaluator, utils
|
5 |
from svc.schemas import LMHarnessTaskRequest, LMHarnessTaskResponse, OAuth2PasswordRequestForm, User
|
6 |
+
from auth.authentication import get_current_user, create_access_token
|
7 |
+
from dotenv import load_dotenv
|
8 |
+
import os
|
9 |
|
10 |
router = APIRouter()
|
11 |
|
12 |
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
|
13 |
logger = logging.getLogger(__name__)
|
14 |
|
15 |
+
|
|
|
16 |
|
17 |
load_dotenv()
|
18 |
@router.post("/token")
|