雷娃 commited on
Commit
06a57b1
·
1 Parent(s): fd5c246

add install.sh

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -76,11 +76,15 @@ def respond(
76
 
77
  model_inputs = tokenizer([text], return_tensors="pt", return_token_type_ids=False).to(model.device)
78
 
79
- model_inputs.update(dict(max_new_tokens=max_tokens,
80
- temperature = temperature,
81
- top_p = top_p,
 
 
 
82
  presence_penalty = 1.5,
83
- streamer=streamer))
 
84
 
85
  # Start a separate thread for model generation to allow streaming output
86
  thread = Thread(
 
76
 
77
  model_inputs = tokenizer([text], return_tensors="pt", return_token_type_ids=False).to(model.device)
78
 
79
+ print(f"max_new_tokens={max_tokens}, temperature={temperature}, top_p={top_p}")
80
+ model_inputs.update(
81
+ dict(max_new_tokens=max_tokens,
82
+ streamer = streamer,
83
+ temperature = float(temperature),
84
+ top_p = float(top_p),
85
  presence_penalty = 1.5,
86
+ )
87
+ )
88
 
89
  # Start a separate thread for model generation to allow streaming output
90
  thread = Thread(