IsmaeelPandey commited on
Commit
58c3f91
·
1 Parent(s): 9c2bff1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -64,10 +64,9 @@ st.write('You selected', option)
64
 
65
  prompt = st.chat_input("Say something to our #CodeWars bot...")
66
  context = [] # the context stores a conversation history, you can use this to make the model more context aware
67
- while True:
68
- if(prompt):
69
- st.write(f"{datetime.datetime.now()} :red[{option}:] ", prompt)
70
- context = qachain({"query": prompt})
71
-
72
- st.write(f"{datetime.datetime.now()} :red[Bot:] ", context['result'])
73
-
 
64
 
65
  prompt = st.chat_input("Say something to our #CodeWars bot...")
66
  context = [] # the context stores a conversation history, you can use this to make the model more context aware
67
+ if(prompt):
68
+ with st.chat_message(option):
69
+ st.write(f"{datetime.datetime.now()} :red[{option}:] ", prompt)
70
+ context = qachain({"query": prompt})
71
+
72
+ st.write(f"{datetime.datetime.now()}", context['result'])