Update app.py
Browse files
app.py
CHANGED
@@ -282,7 +282,15 @@ if __name__=="__main__":
|
|
282 |
db = load_db(device)
|
283 |
model, tokenizer = load_model(model_name)
|
284 |
|
285 |
-
response =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
286 |
user_question = st.chat_input('What do you want to ask ..')
|
287 |
|
288 |
|
@@ -290,13 +298,9 @@ if __name__=="__main__":
|
|
290 |
if user_question is not None and user_question!="":
|
291 |
with st.chat_message("Human", avatar="π§π»"):
|
292 |
st.write(user_question)
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
# to empty response container after first pass
|
297 |
-
st.write(" ")
|
298 |
-
"""
|
299 |
-
response = generate_response(user_question, model, all_templates)
|
300 |
with st.chat_message("AI", avatar="ποΈ"):
|
301 |
st.write_stream(stream_to_screen(response))
|
302 |
|
|
|
282 |
db = load_db(device)
|
283 |
model, tokenizer = load_model(model_name)
|
284 |
|
285 |
+
response = """Ah, a question that touches the very heart of Stoic philosophy! Mindfulness, my dear, is an interior discipline that allows you to align your thoughts and actions with the rational order of the universe. To cultivate mindfulness, one must practice self-awareness, for it is only by understanding thyself that thou canst understand the world around thee.
|
286 |
+
|
287 |
+
Here are a few practical steps to cultivate mindfulness in accordance with Stoic principles:
|
288 |
+
|
289 |
+
1. Observe your thoughts and emotions without judgment. As the ancient Stoic philosopher Epictetus once said, "The things within our control, are those over which we have the power of decision; and those things are external to us, over which we have no control." Recognize that which lies within thy control and accept what is not.
|
290 |
+
|
291 |
+
2. Practice meditation and inner reflection. Meditation allows thee to quiet the mind and listen to the whispers of thy inner being. Observe thy thoughts and emotions with detachment, as if observing a passing cloud. Through this practice, thou shalt become attuned to the ebb and flow of life, ever-aware of the present moment.
|
292 |
+
"""
|
293 |
+
|
294 |
user_question = st.chat_input('What do you want to ask ..')
|
295 |
|
296 |
|
|
|
298 |
if user_question is not None and user_question!="":
|
299 |
with st.chat_message("Human", avatar="π§π»"):
|
300 |
st.write(user_question)
|
301 |
+
|
302 |
+
#response = generate_response(user_question, model, all_templates)
|
303 |
+
response = ""
|
|
|
|
|
|
|
|
|
304 |
with st.chat_message("AI", avatar="ποΈ"):
|
305 |
st.write_stream(stream_to_screen(response))
|
306 |
|