Solshine commited on
Commit
f018a1b
1 Parent(s): cbdef20

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -89,8 +89,7 @@ def launch_bot():
89
  prompt2 = prompt + master_prompt
90
  response = generate_response(prompt2)
91
  if response == 'The returned results did not contain sufficient information to be summarized into a useful answer for your query. Please try a different search or restate your query differently.':
92
- st.write("reroute to LLM")
93
- else:
94
  #call in Mistral
95
  device = "cuda" # the device to load the model onto
96
 
@@ -109,7 +108,8 @@ def launch_bot():
109
 
110
  generated_ids = model.generate(**model_inputs, max_new_tokens=100, do_sample=True)
111
  st.write(tokenizer.batch_decode(generated_ids)[0])
112
- # st.write(response)
 
113
  message = {"role": "assistant", "content": response}
114
  st.session_state.messages.append(message)
115
 
 
89
  prompt2 = prompt + master_prompt
90
  response = generate_response(prompt2)
91
  if response == 'The returned results did not contain sufficient information to be summarized into a useful answer for your query. Please try a different search or restate your query differently.':
92
+ #st.write("reroute to LLM")
 
93
  #call in Mistral
94
  device = "cuda" # the device to load the model onto
95
 
 
108
 
109
  generated_ids = model.generate(**model_inputs, max_new_tokens=100, do_sample=True)
110
  st.write(tokenizer.batch_decode(generated_ids)[0])
111
+ else:
112
+ st.write(response)
113
  message = {"role": "assistant", "content": response}
114
  st.session_state.messages.append(message)
115