Spaces:
Sleeping
Sleeping
hf token
Browse files
app.py
CHANGED
@@ -1,6 +1,13 @@
|
|
|
|
1 |
from fastapi import FastAPI, Request
|
2 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
3 |
import torch
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
model_id = "google/gemma-2-9b-it"
|
6 |
|
|
|
1 |
+
from debugpy.adapter import access_token
|
2 |
from fastapi import FastAPI, Request
|
3 |
from transformers import AutoTokenizer, AutoModelForCausalLM
|
4 |
import torch
|
5 |
+
from huggingface_hub import login
|
6 |
+
import os
|
7 |
+
|
8 |
+
# read access token from environment variable
|
9 |
+
access_token = os.getenv('HF_TOKEN')
|
10 |
+
login(access_token)
|
11 |
|
12 |
model_id = "google/gemma-2-9b-it"
|
13 |
|