Ilyas KHIAT
commited on
Commit
·
02c1715
1
Parent(s):
f484ffe
correction
Browse files- chat_with_pps.py +1 -1
- partie_prenante_carte.py +2 -2
chat_with_pps.py
CHANGED
|
@@ -64,13 +64,13 @@ def display_chart():
|
|
| 64 |
def display_chat():
|
| 65 |
# app config
|
| 66 |
st.title("Chatbot")
|
|
|
|
| 67 |
# session state
|
| 68 |
if "chat_history" not in st.session_state:
|
| 69 |
st.session_state.chat_history = [
|
| 70 |
AIMessage(content="Salut, voici votre cartographie des parties prenantes. Que puis-je faire pour vous?"),
|
| 71 |
]
|
| 72 |
|
| 73 |
-
st.markdown(format_context(st.session_state['pp_grouped'],st.session_state['Nom de la marque']))
|
| 74 |
|
| 75 |
# conversation
|
| 76 |
for message in st.session_state.chat_history:
|
|
|
|
| 64 |
def display_chat():
|
| 65 |
# app config
|
| 66 |
st.title("Chatbot")
|
| 67 |
+
|
| 68 |
# session state
|
| 69 |
if "chat_history" not in st.session_state:
|
| 70 |
st.session_state.chat_history = [
|
| 71 |
AIMessage(content="Salut, voici votre cartographie des parties prenantes. Que puis-je faire pour vous?"),
|
| 72 |
]
|
| 73 |
|
|
|
|
| 74 |
|
| 75 |
# conversation
|
| 76 |
for message in st.session_state.chat_history:
|
partie_prenante_carte.py
CHANGED
|
@@ -195,7 +195,7 @@ def add_pp_input_text():
|
|
| 195 |
new_pp = st.text_input("Ajouter une partie prenante")
|
| 196 |
if st.button("Ajouter"):
|
| 197 |
st.session_state["save"] = True
|
| 198 |
-
|
| 199 |
|
| 200 |
import re
|
| 201 |
|
|
@@ -285,7 +285,7 @@ def display_pp():
|
|
| 285 |
with st.spinner("Processing..."):
|
| 286 |
|
| 287 |
#handle the extraction
|
| 288 |
-
input_variables = {"BRAND_NAME": brand_name, "BRAND_DESCRIPTION": "
|
| 289 |
partie_prenante = extract_pp([url], input_variables)
|
| 290 |
|
| 291 |
if "444" in partie_prenante: #444 is the code for no brand found , chosen
|
|
|
|
| 195 |
new_pp = st.text_input("Ajouter une partie prenante")
|
| 196 |
if st.button("Ajouter"):
|
| 197 |
st.session_state["save"] = True
|
| 198 |
+
format_pp_add_viz(new_pp)
|
| 199 |
|
| 200 |
import re
|
| 201 |
|
|
|
|
| 285 |
with st.spinner("Processing..."):
|
| 286 |
|
| 287 |
#handle the extraction
|
| 288 |
+
input_variables = {"BRAND_NAME": brand_name, "BRAND_DESCRIPTION": ""}
|
| 289 |
partie_prenante = extract_pp([url], input_variables)
|
| 290 |
|
| 291 |
if "444" in partie_prenante: #444 is the code for no brand found , chosen
|