Pclanglais commited on
Commit
dcbc7a2
1 Parent(s): 1e44fa4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -71,6 +71,8 @@ class StopOnTokens(StoppingCriteria):
71
  def predict(message, history):
72
  text = vector_search(message)
73
  message = message + "\n\n### Source ###\n" + text
 
 
74
  history_transformer_format = history + [[message, ""]]
75
  stop = StopOnTokens()
76
 
@@ -85,11 +87,9 @@ def predict(message, history):
85
  model_inputs,
86
  streamer=streamer,
87
  max_new_tokens=1024,
88
- do_sample=True,
89
  top_p=0.95,
90
- top_k=1000,
91
- temperature=1.0,
92
- num_beams=1,
93
  stopping_criteria=StoppingCriteriaList([stop])
94
  )
95
  t = Thread(target=model.generate, kwargs=generate_kwargs)
 
71
  def predict(message, history):
72
  text = vector_search(message)
73
  message = message + "\n\n### Source ###\n" + text
74
+
75
+ print(message)
76
  history_transformer_format = history + [[message, ""]]
77
  stop = StopOnTokens()
78
 
 
87
  model_inputs,
88
  streamer=streamer,
89
  max_new_tokens=1024,
90
+ do_sample=False,
91
  top_p=0.95,
92
+ temperature=0.4,
 
 
93
  stopping_criteria=StoppingCriteriaList([stop])
94
  )
95
  t = Thread(target=model.generate, kwargs=generate_kwargs)