ecemumutlu commited on
Commit
ab80e4c
·
1 Parent(s): 0641e53

Change authentication password

Browse files
Files changed (1) hide show
  1. svc/router.py +2 -1
svc/router.py CHANGED
@@ -20,7 +20,7 @@ load_dotenv()
20
 
21
  @router.post("/token")
22
  async def login_for_access_token(form_data: OAuth2PasswordRequestForm = Depends()):
23
- hf_token = os.getenv("HF_TOKEN")
24
  if hf_token != form_data.password:
25
  raise HTTPException(status_code=400, detail="Incorrect username or password")
26
  access_token = create_access_token(data={"sub": form_data.username})
@@ -62,6 +62,7 @@ def inference_model(request: LMHarnessTaskRequest, username: str = Depends(get_c
62
  return LMHarnessTaskResponse(results=dumped)
63
 
64
 
 
65
  # @router.post("/load_model")
66
  # async def load_model(request: LoadModelRequest):
67
  # model = AutoModelForCausalLM.from_pretrained(
 
20
 
21
  @router.post("/token")
22
  async def login_for_access_token(form_data: OAuth2PasswordRequestForm = Depends()):
23
+ hf_token = os.getenv("AUTH_UUID")
24
  if hf_token != form_data.password:
25
  raise HTTPException(status_code=400, detail="Incorrect username or password")
26
  access_token = create_access_token(data={"sub": form_data.username})
 
62
  return LMHarnessTaskResponse(results=dumped)
63
 
64
 
65
+
66
  # @router.post("/load_model")
67
  # async def load_model(request: LoadModelRequest):
68
  # model = AutoModelForCausalLM.from_pretrained(