Rijgersberg commited on
Commit
0ce20c6
1 Parent(s): 09d4545

Model is public now, no token needed

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -9,15 +9,13 @@ import spaces
9
  import torch
10
  from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
11
 
12
- HF_TOKEN = os.environ['HF_TOKEN']
13
-
14
  MAX_MAX_NEW_TOKENS = 2048
15
  DEFAULT_MAX_NEW_TOKENS = 1024
16
  MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
17
 
18
  if torch.cuda.is_available():
19
  model_id = "Rijgersberg/GEITje-7B-chat"
20
- model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto", token=HF_TOKEN)
21
  tokenizer = AutoTokenizer.from_pretrained(model_id, token=HF_TOKEN)
22
 
23
 
 
9
  import torch
10
  from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
11
 
 
 
12
  MAX_MAX_NEW_TOKENS = 2048
13
  DEFAULT_MAX_NEW_TOKENS = 1024
14
  MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
15
 
16
  if torch.cuda.is_available():
17
  model_id = "Rijgersberg/GEITje-7B-chat"
18
+ model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto")
19
  tokenizer = AutoTokenizer.from_pretrained(model_id, token=HF_TOKEN)
20
 
21