Ilyas KHIAT
commited on
Commit
·
3fd145c
1
Parent(s):
c4c63f6
modif
Browse files- RAG_PDF_WEB.py +18 -15
RAG_PDF_WEB.py
CHANGED
|
@@ -162,7 +162,7 @@ def rag_pdf_web():
|
|
| 162 |
if option == "A partir de vos documents entreprise":
|
| 163 |
pdf_docs = st.file_uploader("Upload les documents concernant la marque (maximum 3 fichiers de taille max de 5 Mo)", type="pdf", accept_multiple_files=True)
|
| 164 |
# Process the PDF documents
|
| 165 |
-
sous_options = st.radio("
|
| 166 |
if st.button("Process"):
|
| 167 |
with st.spinner("Processing..."):
|
| 168 |
#get pdf text in raw format
|
|
@@ -177,20 +177,23 @@ def rag_pdf_web():
|
|
| 177 |
chain = get_conversation_chain(vectorstore)
|
| 178 |
|
| 179 |
if sous_options == "Ambition, Vision, Missions, Valeurs":
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
st.markdown(
|
|
|
|
|
|
|
|
|
|
| 194 |
values = chain.invoke("Quels sont les valeurs de l'entreprise ? (répondre avec 10 mots maximum en bullet points)")
|
| 195 |
st.markdown("### Valeurs :")
|
| 196 |
st.markdown(values.content)
|
|
|
|
| 162 |
if option == "A partir de vos documents entreprise":
|
| 163 |
pdf_docs = st.file_uploader("Upload les documents concernant la marque (maximum 3 fichiers de taille max de 5 Mo)", type="pdf", accept_multiple_files=True)
|
| 164 |
# Process the PDF documents
|
| 165 |
+
sous_options = st.radio("Choisissez votre sous-section", ("Ambition, Vision, Missions, Valeurs", "3 piliers de la démarche RSE"))
|
| 166 |
if st.button("Process"):
|
| 167 |
with st.spinner("Processing..."):
|
| 168 |
#get pdf text in raw format
|
|
|
|
| 177 |
chain = get_conversation_chain(vectorstore)
|
| 178 |
|
| 179 |
if sous_options == "Ambition, Vision, Missions, Valeurs":
|
| 180 |
+
|
| 181 |
+
#ambition
|
| 182 |
+
ambition = chain.invoke("Quelle est l'ambition de l'entreprise ? (répondre avec maximum 250 caractères)")
|
| 183 |
+
st.markdown("### Ambition :")
|
| 184 |
+
st.markdown(ambition.content)
|
| 185 |
+
|
| 186 |
+
#vision
|
| 187 |
+
ambition = chain.invoke(" Quelle est la vision de l'entreprise ? (répondre avec maximum 250 caractères)")
|
| 188 |
+
st.markdown("### Vision :")
|
| 189 |
+
st.markdown(ambition.content)
|
| 190 |
+
|
| 191 |
+
#Mission
|
| 192 |
+
ambition = chain.invoke(" Quelle est la vision de l'entreprise ? (répondre avec maximum 250 caractères)")
|
| 193 |
+
st.markdown("### Mission :")
|
| 194 |
+
st.markdown(ambition.content)
|
| 195 |
+
|
| 196 |
+
#values
|
| 197 |
values = chain.invoke("Quels sont les valeurs de l'entreprise ? (répondre avec 10 mots maximum en bullet points)")
|
| 198 |
st.markdown("### Valeurs :")
|
| 199 |
st.markdown(values.content)
|