Vitrous commited on
Commit
e0a385c
·
verified ·
1 Parent(s): c9cc0e9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -62,11 +62,8 @@ def generate_response(prompt: str) -> dict:
62
  repetition_penalty=1.1
63
  )
64
  # Generate the response
65
- #generated_response = pipe(prompt_template)[0]['generated_text']
66
 
67
- input_ids = tokenizer(prompt_template, return_tensors='pt').input_ids.cuda()
68
- output = model.generate(inputs=input_ids, temperature=0.7, do_sample=True, top_p=0.95, top_k=40, max_new_tokens=512)
69
- generated_response = (tokenizer.decode(output[0]))
70
  # Extract the assistant's reply
71
  assistant_reply = generated_response.split('\n')[1]
72
 
 
62
  repetition_penalty=1.1
63
  )
64
  # Generate the response
65
+ generated_response = pipe(prompt_template)[0]['generated_text']
66
 
 
 
 
67
  # Extract the assistant's reply
68
  assistant_reply = generated_response.split('\n')[1]
69