arampacha commited on
Commit
3d7233c
1 Parent(s): 4de1f02
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -14,6 +14,7 @@ parameters = {
14
  "top_p":0.92,
15
  "temperature":1.0,
16
  "repetition_penalty":None,
 
17
  }
18
 
19
 
@@ -29,13 +30,13 @@ def on_input():
29
  past_user_inputs = st.session_state.past_user_inputs,
30
  generated_responses = st.session_state.generated_responses,
31
  )
32
- conv = dialog(conv)
33
  try:
34
  st.session_state.update({
35
  "past_user_inputs": conv.past_user_inputs,
36
  "generated_responses": conv.generated_responses,
37
  })
38
- st.session_state.full_text += f'_chatbot_ > {conv.generated_text[-1]}\n\n'
39
  except Exception as e:
40
  st.write("D'oh! Something went wrong. Try to rerun the app.")
41
  st.write(conv)
 
14
  "top_p":0.92,
15
  "temperature":1.0,
16
  "repetition_penalty":None,
17
+ "do_sample":True,
18
  }
19
 
20
 
 
30
  past_user_inputs = st.session_state.past_user_inputs,
31
  generated_responses = st.session_state.generated_responses,
32
  )
33
+ conv = dialog(conv, **parameters)
34
  try:
35
  st.session_state.update({
36
  "past_user_inputs": conv.past_user_inputs,
37
  "generated_responses": conv.generated_responses,
38
  })
39
+ st.session_state.full_text += f'_chatbot_ > {conv.generated_responses[-1]}\n\n'
40
  except Exception as e:
41
  st.write("D'oh! Something went wrong. Try to rerun the app.")
42
  st.write(conv)