Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
|
|
| 4 |
|
| 5 |
# Use the base (untrained) model from Hugging Face Hub
|
| 6 |
model_id = "mistralai/Mistral-7B-Instruct-v0.3"
|
| 7 |
-
api_key = os.environ.get("
|
| 8 |
|
| 9 |
tokenizer = AutoTokenizer.from_pretrained(model_id, token = api_key)
|
| 10 |
model = AutoModelForCausalLM.from_pretrained(model_id, token = api_key)
|
|
|
|
| 4 |
|
| 5 |
# Use the base (untrained) model from Hugging Face Hub
|
| 6 |
model_id = "mistralai/Mistral-7B-Instruct-v0.3"
|
| 7 |
+
api_key = os.environ.get("HF_KEY") # Your Hugging Face token
|
| 8 |
|
| 9 |
tokenizer = AutoTokenizer.from_pretrained(model_id, token = api_key)
|
| 10 |
model = AutoModelForCausalLM.from_pretrained(model_id, token = api_key)
|