awacke1 commited on
Commit
44d6790
·
verified ·
1 Parent(s): 9e48313

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -7
app.py CHANGED
@@ -118,24 +118,29 @@ def search_glossary(query, roleplaying_glossary):
118
  if not found:
119
  st.write("No results found.")
120
 
121
- st.write('## Processing query against GPT and Llama:')
 
122
 
123
  all=""
124
- st.write('🔍Running with GPT.') # -------------------------------------------------------------------------------------------------
125
  response = chat_with_model(query)
126
- st.write(response)
127
 
128
  filename = generate_filename(query + ' --- ' + response, "md")
129
- create_file(filename, query, query + ' --- ' + response, should_save)
130
 
131
- st.write('🔍Running with Llama.') # -------------------------------------------------------------------------------------------------
132
  response2 = StreamLLMChatResponse(query)
133
- st.write(response2)
134
 
135
  filename_txt = generate_filename(query + ' --- ' + response2, "md")
136
- create_file(filename_txt, query, query + ' --- ' + response2, should_save)
137
 
138
  all = '# Query: ' + query + '# Response: ' + response + '# Response2: ' + response2
 
 
 
 
139
  SpeechSynthesis(all)
140
  return all
141
 
 
118
  if not found:
119
  st.write("No results found.")
120
 
121
+
122
+ st.write('## ' + query)
123
 
124
  all=""
125
+ st.write('## 🔍 Running with GPT.') # -------------------------------------------------------------------------------------------------
126
  response = chat_with_model(query)
127
+ #st.write(response)
128
 
129
  filename = generate_filename(query + ' --- ' + response, "md")
130
+ create_file(filename, query, response, should_save)
131
 
132
+ st.write('## 🔍 Running with Llama.') # -------------------------------------------------------------------------------------------------
133
  response2 = StreamLLMChatResponse(query)
134
+ #st.write(response2)
135
 
136
  filename_txt = generate_filename(query + ' --- ' + response2, "md")
137
+ create_file(filename_txt, query, response2, should_save)
138
 
139
  all = '# Query: ' + query + '# Response: ' + response + '# Response2: ' + response2
140
+
141
+ filename_txt2 = generate_filename(query + ' --- ' + all, "md")
142
+ create_file(filename_txt2, query, all, should_save)
143
+
144
  SpeechSynthesis(all)
145
  return all
146