Spaces:
Runtime error
Runtime error
Update apppy.bak
Browse files
apppy.bak
CHANGED
|
@@ -29,6 +29,12 @@ missing_vars = [var for var in required_vars if not globals().get(var)]
|
|
| 29 |
if missing_vars:
|
| 30 |
raise ValueError(f"Missing environment variables: {', '.join(missing_vars)}")
|
| 31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
# Initialize the Hugging Face tokenizer and model for DialoGPT
|
| 33 |
model_name = "microsoft/DialoGPT-small"
|
| 34 |
tokenizer = AutoTokenizer.from_pretrained(model_name, token=HUGGINGFACE_API_TOKEN)
|
|
|
|
| 29 |
if missing_vars:
|
| 30 |
raise ValueError(f"Missing environment variables: {', '.join(missing_vars)}")
|
| 31 |
|
| 32 |
+
model_name = "jacksonstrut/tinyllama-1.1B-chat"
|
| 33 |
+
|
| 34 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name, use_auth_token=HUGGINGFACE_API_TOKEN)
|
| 35 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, use_auth_token=HUGGINGFACE_API_TOKEN)
|
| 36 |
+
model.to('cpu')
|
| 37 |
+
|
| 38 |
# Initialize the Hugging Face tokenizer and model for DialoGPT
|
| 39 |
model_name = "microsoft/DialoGPT-small"
|
| 40 |
tokenizer = AutoTokenizer.from_pretrained(model_name, token=HUGGINGFACE_API_TOKEN)
|