BramVanroy commited on
Commit
fe2f876
1 Parent(s): 7d9dc21

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -14,10 +14,10 @@ MAX_MAX_NEW_TOKENS = 2048
14
  DEFAULT_MAX_NEW_TOKENS = 1024
15
  MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "8192"))
16
 
17
- if torch.cuda.is_available():
18
- model_id = "BramVanroy/GEITje-7B-ultra"
19
- model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
20
- tokenizer = AutoTokenizer.from_pretrained(model_id)
21
 
22
 
23
  @spaces.GPU
 
14
  DEFAULT_MAX_NEW_TOKENS = 1024
15
  MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "8192"))
16
 
17
+ model_id = "BramVanroy/GEITje-7B-ultra"
18
+ model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="auto")
19
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
20
+ tokenizer.pad_token_id = tokenizer.eos_token_id
21
 
22
 
23
  @spaces.GPU