Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -46,8 +46,8 @@ h1 {
|
|
46 |
}
|
47 |
"""
|
48 |
|
49 |
-
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True
|
50 |
-
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", trust_remote_code=True, torch_dtype=torch.bfloat16
|
51 |
terminators = [tokenizer.eos_token_id]
|
52 |
|
53 |
@spaces.GPU(duration=120)
|
|
|
46 |
}
|
47 |
"""
|
48 |
|
49 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
|
50 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto", trust_remote_code=True, torch_dtype=torch.bfloat16).eval()
|
51 |
terminators = [tokenizer.eos_token_id]
|
52 |
|
53 |
@spaces.GPU(duration=120)
|