Spaces:
Sleeping
Sleeping
Demosthene-OR
commited on
Commit
•
c6039f1
1
Parent(s):
550667f
Update chatbot_tab.py
Browse files- 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 |
-
|
137 |
-
|
138 |
-
|
139 |
-
st.button(label=tr("Validez"), type="primary")
|
140 |
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
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 |
'''
|