Demosthene-OR commited on
Commit
c6039f1
1 Parent(s): 550667f

Update chatbot_tab.py

Browse files
Files changed (1) hide show
  1. tabs/chatbot_tab.py +14 -17
tabs/chatbot_tab.py CHANGED
@@ -120,31 +120,28 @@ messages = [
120
 
121
 
122
  trimmer.invoke(messages)
 
 
 
 
123
 
124
  def run():
125
 
126
  st.write("")
127
  st.write("")
128
  st.title(tr(title))
129
-
130
- language = "French"
131
- st.write("Contexte: "+context+"\n")
132
- st.write("Human Message: "+human_message1+"\n")
133
- st.write("AI Message: "+ai_message1+"\n")
134
- query = ""
135
 
136
- while query != "exit":
137
- st.write("thread_id: "+thread_id)
138
- query = st.text_area(label=tr("Vendeur:"), value="")
139
- st.button(label=tr("Validez"), type="primary")
140
 
141
- input_messages = [HumanMessage(query)]
142
- if query != "":
143
- output = app.invoke(
144
- {"messages": input_messages, "language": language},
145
- config,
146
- )
147
- st.write(output["messages"][-1].content)
148
 
149
 
150
  '''
 
120
 
121
 
122
  trimmer.invoke(messages)
123
+ language = "French"
124
+ st.write("Contexte: "+context+"\n")
125
+ st.write("Human Message: "+human_message1+"\n")
126
+ st.write("AI Message: "+ai_message1+"\n")
127
 
128
  def run():
129
 
130
  st.write("")
131
  st.write("")
132
  st.title(tr(title))
 
 
 
 
 
 
133
 
134
+ st.write("thread_id: "+thread_id)
135
+ query = st.text_area(label=tr("Vendeur:"), value="")
136
+ st.button(label=tr("Validez"), type="primary")
 
137
 
138
+ input_messages = [HumanMessage(query)]
139
+ if query != "":
140
+ output = app.invoke(
141
+ {"messages": input_messages, "language": language},
142
+ config,
143
+ )
144
+ st.write(output["messages"][-1].content)
145
 
146
 
147
  '''