awacke1 commited on
Commit
38685dc
·
verified ·
1 Parent(s): a3cccd5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -11
app.py CHANGED
@@ -72,20 +72,30 @@ def search_glossary(query):
72
  st.markdown(f"#### {category}")
73
  st.write(f"- {query}")
74
 
75
- st.write('## Processing query against GPT and Llama:')
76
- # ------------------------------------------------------------------------------------------------
77
- st.write('Reasoning with your inputs using GPT...')
 
78
  response = chat_with_model(query)
79
- st.write('Response:')
80
- st.write(response)
81
- filename = generate_filename(response, "txt")
82
  create_file(filename, query, response, should_save)
83
 
84
- st.write('Reasoning with your inputs using Llama...')
85
- response = StreamLLMChatResponse(query)
86
- filename_txt = generate_filename(query, "md")
87
- create_file(filename_txt, query, response, should_save)
88
- # ------------------------------------------------------------------------------------------------
 
 
 
 
 
 
 
 
 
89
 
90
  # Display the glossary with Streamlit components, ensuring emojis are used
91
  def display_glossary(area):
 
72
  st.markdown(f"#### {category}")
73
  st.write(f"- {query}")
74
 
75
+ st.write('## ' + query)
76
+
77
+ all=""
78
+ st.write('## 🔍 Running with GPT.') # -------------------------------------------------------------------------------------------------
79
  response = chat_with_model(query)
80
+ #st.write(response)
81
+
82
+ filename = generate_filename(query + ' --- ' + response, "md")
83
  create_file(filename, query, response, should_save)
84
 
85
+ st.write('## 🔍 Running with Llama.') # -------------------------------------------------------------------------------------------------
86
+ response2 = StreamLLMChatResponse(query)
87
+ #st.write(response2)
88
+
89
+ filename_txt = generate_filename(query + ' --- ' + response2, "md")
90
+ create_file(filename_txt, query, response2, should_save)
91
+
92
+ all = '# Query: ' + query + '# Response: ' + response + '# Response2: ' + response2
93
+
94
+ filename_txt2 = generate_filename(query + ' --- ' + all, "md")
95
+ create_file(filename_txt2, query, all, should_save)
96
+
97
+ SpeechSynthesis(all)
98
+ return all
99
 
100
  # Display the glossary with Streamlit components, ensuring emojis are used
101
  def display_glossary(area):