Skip to content

Commit

Permalink
removed support for gated tokenizers
Browse files Browse the repository at this point in the history
  • Loading branch information
valaises committed Dec 17, 2024
1 parent 6b07d6a commit c49b7c9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions refact_webgui/webgui/selfhost_fastapi_completions.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,10 +339,7 @@ async def _passthrough_tokenizer(self, model_path: str) -> str:
try:
async with aiohttp.ClientSession() as session:
tokenizer_url = f"https://huggingface.co/{model_path}/resolve/main/tokenizer.json"
headers = {}
if hf_token := huggingface_hub_token():
headers["Authorization"] = f"Bearer {hf_token}"
async with session.get(tokenizer_url, headers=headers) as resp:
async with session.get(tokenizer_url) as resp:
return await resp.text()
except:
raise HTTPException(404, detail=f"can't load tokenizer.json for passthrough {model_path}")
Expand Down

0 comments on commit c49b7c9

Please sign in to comment.