Locutusque commited on
Commit
f99c184
1 Parent(s): 6f0a2b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -13,7 +13,7 @@ generator = pipeline('text-generation', model='mistralai/Mistral-7B-v0.1', torch
13
  def generate_text(prompt, temperature, top_p, top_k, repetition_penalty, max_length):
14
  # Generate text using the model
15
  generator.model.cuda()
16
- generator.device = "cuda"
17
  outputs = generator(
18
  prompt,
19
  max_new_tokens=max_length,
 
13
  def generate_text(prompt, temperature, top_p, top_k, repetition_penalty, max_length):
14
  # Generate text using the model
15
  generator.model.cuda()
16
+ generator.device = torch.device("cuda")
17
  outputs = generator(
18
  prompt,
19
  max_new_tokens=max_length,