Akjava commited on
Commit
faac8da
·
verified ·
1 Parent(s): 8ce7d79

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -57,7 +57,7 @@ def generate_text(messages):
57
  model_id, token=huggingface_token ,torch_dtype=dtype,device_map=device
58
  )
59
  text_generator = pipeline("text-generation", model=model, tokenizer=tokenizer,torch_dtype=dtype,device_map=device ) #pipeline has not to(device)
60
- result = text_generator(messages, max_new_tokens=64, do_sample=True, temperature=0.7)
61
 
62
  generated_output = result[0]["generated_text"]
63
  if isinstance(generated_output, list):
 
57
  model_id, token=huggingface_token ,torch_dtype=dtype,device_map=device
58
  )
59
  text_generator = pipeline("text-generation", model=model, tokenizer=tokenizer,torch_dtype=dtype,device_map=device ) #pipeline has not to(device)
60
+ result = text_generator(messages, max_new_tokens=32, do_sample=True, temperature=0.7)
61
 
62
  generated_output = result[0]["generated_text"]
63
  if isinstance(generated_output, list):