Update app.py
Browse files
app.py
CHANGED
|
@@ -20,8 +20,8 @@ MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "4096"))
|
|
| 20 |
|
| 21 |
if torch.cuda.is_available():
|
| 22 |
model_id = "mistralai/Mistral-7B-Instruct-v0.2"
|
| 23 |
-
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto", token=
|
| 24 |
-
tokenizer = AutoTokenizer.from_pretrained(model_id, token=
|
| 25 |
|
| 26 |
|
| 27 |
@spaces.GPU
|
|
|
|
| 20 |
|
| 21 |
if torch.cuda.is_available():
|
| 22 |
model_id = "mistralai/Mistral-7B-Instruct-v0.2"
|
| 23 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.float16, device_map="auto", token=HF_TOKEN)
|
| 24 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id, token=HF_TOKEN)
|
| 25 |
|
| 26 |
|
| 27 |
@spaces.GPU
|