Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ bnb_config = BitsAndBytesConfig(
|
|
18 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
19 |
model = AutoModelForCausalLM.from_pretrained(model_name, quantization_config=bnb_config, low_cpu_mem_usage=True)
|
20 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
21 |
-
model.to(device)
|
22 |
|
23 |
def generate_text(user_prompt):
|
24 |
"""Generates text using the ConvAI model from Hugging Face Transformers and removes the user prompt."""
|
|
|
18 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
19 |
model = AutoModelForCausalLM.from_pretrained(model_name, quantization_config=bnb_config, low_cpu_mem_usage=True)
|
20 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
21 |
+
#model.to(device)
|
22 |
|
23 |
def generate_text(user_prompt):
|
24 |
"""Generates text using the ConvAI model from Hugging Face Transformers and removes the user prompt."""
|