Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -147,27 +147,27 @@ def search_glossary(query, roleplaying_glossary):
|
|
| 147 |
st.write("No results found.")
|
| 148 |
|
| 149 |
st.write('## Processing query against GPT and Llama:')
|
| 150 |
-
|
| 151 |
-
|
|
|
|
| 152 |
response = chat_with_model(query)
|
| 153 |
-
st.write('Response:')
|
| 154 |
st.write(response)
|
| 155 |
-
|
|
|
|
| 156 |
create_file(filename, query, query + ' --- ' + response, should_save)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
response2 = StreamLLMChatResponse(query)
|
| 161 |
-
response = StreamLLMChatResponse(query)
|
| 162 |
-
filename_txt = generate_filename(query, "md")
|
| 163 |
-
create_file(filename_txt, query, query + ' --- ' + response2, should_save)
|
| 164 |
-
return '# Query: ' + query + '# Response: ' + response + '# Response2: ' + response2
|
| 165 |
-
|
| 166 |
-
return '# Query: ' + query + '# Response: ' + response
|
| 167 |
-
# ------------------------------------------------------------------------------------------------
|
| 168 |
-
|
| 169 |
|
|
|
|
|
|
|
|
|
|
| 170 |
|
|
|
|
| 171 |
# Function to display the glossary in a structured format
|
| 172 |
def display_glossary(glossary, area):
|
| 173 |
if area in glossary:
|
|
|
|
| 147 |
st.write("No results found.")
|
| 148 |
|
| 149 |
st.write('## Processing query against GPT and Llama:')
|
| 150 |
+
|
| 151 |
+
all=""
|
| 152 |
+
st.write('🔍Running with GPT.') # -------------------------------------------------------------------------------------------------
|
| 153 |
response = chat_with_model(query)
|
|
|
|
| 154 |
st.write(response)
|
| 155 |
+
|
| 156 |
+
filename = generate_filename(query + ' --- ' + response, "md")
|
| 157 |
create_file(filename, query, query + ' --- ' + response, should_save)
|
| 158 |
+
|
| 159 |
+
st.write('🔍Running with Llama.') # -------------------------------------------------------------------------------------------------
|
| 160 |
+
response2 = StreamLLMChatResponse(query)
|
| 161 |
+
st.write(response2)
|
| 162 |
|
| 163 |
+
filename_txt = generate_filename(query + ' --- ' + response2, "md")
|
| 164 |
+
create_file(filename_txt, query, query + ' --- ' + response2, should_save)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 165 |
|
| 166 |
+
all = '# Query: ' + query + '# Response: ' + response + '# Response2: ' + response2
|
| 167 |
+
SpeechSynthesis(all)
|
| 168 |
+
return all
|
| 169 |
|
| 170 |
+
|
| 171 |
# Function to display the glossary in a structured format
|
| 172 |
def display_glossary(glossary, area):
|
| 173 |
if area in glossary:
|