Spaces:
Sleeping
Sleeping
cd@bziiit.com commited on
Commit ·
abe2bca
1
Parent(s): e08187b
feat : add difficult diagnostic pages
Browse files- app.py +10 -2
- config.yaml +36 -133
- pages/chap_11.py +8 -0
- pages/chap_12.py +8 -0
- pages/chap_13.py +8 -0
- pages/chap_14.py +8 -0
- pages/chap_15.py +8 -0
- pages/chapter_params.py +1 -2
app.py
CHANGED
|
@@ -57,9 +57,16 @@ def main():
|
|
| 57 |
documents = st.Page("pages/documents.py", url_path="documents", title="Vos documents", icon="📂")
|
| 58 |
form = st.Page("pages/chapter_params.py", url_path="configurations", title="Paramètres", icon="📋")
|
| 59 |
|
| 60 |
-
|
| 61 |
st.Page(f"pages/chap_{chapter['num']}.py", url_path=chapter['key'], title=chapter['name'], icon="📄")
|
| 62 |
for chapter in st.session_state["chapters"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
]
|
| 64 |
|
| 65 |
|
|
@@ -71,7 +78,8 @@ def main():
|
|
| 71 |
"Configurations": [
|
| 72 |
form,
|
| 73 |
],
|
| 74 |
-
"
|
|
|
|
| 75 |
}
|
| 76 |
)
|
| 77 |
|
|
|
|
| 57 |
documents = st.Page("pages/documents.py", url_path="documents", title="Vos documents", icon="📂")
|
| 58 |
form = st.Page("pages/chapter_params.py", url_path="configurations", title="Paramètres", icon="📋")
|
| 59 |
|
| 60 |
+
chapters_installation = [
|
| 61 |
st.Page(f"pages/chap_{chapter['num']}.py", url_path=chapter['key'], title=chapter['name'], icon="📄")
|
| 62 |
for chapter in st.session_state["chapters"]
|
| 63 |
+
if chapter['num'] < 10
|
| 64 |
+
]
|
| 65 |
+
|
| 66 |
+
chapters_difficult = [
|
| 67 |
+
st.Page(f"pages/chap_{chapter['num']}.py", url_path=chapter['key'], title=chapter['name'], icon="📄")
|
| 68 |
+
for chapter in st.session_state["chapters"]
|
| 69 |
+
if chapter['num'] >= 10
|
| 70 |
]
|
| 71 |
|
| 72 |
|
|
|
|
| 78 |
"Configurations": [
|
| 79 |
form,
|
| 80 |
],
|
| 81 |
+
"Installation": chapters_installation,
|
| 82 |
+
"Difficulté": chapters_difficult,
|
| 83 |
}
|
| 84 |
)
|
| 85 |
|
config.yaml
CHANGED
|
@@ -18,167 +18,70 @@ chapters:
|
|
| 18 |
key: "context_objectives"
|
| 19 |
prompts:
|
| 20 |
- "Pré-remplis le diagnostique"
|
| 21 |
-
prompt_system: "
|
| 22 |
-
|
| 23 |
-
CONTEXTE / RESSOURCES : Tu as accès à l'entretien que le conseiller a eu avec l'exploitant agricole. Cet entretien est fourni sous forme de transcript à cette conversation (voir pièce jointe)\n
|
| 24 |
-
|
| 25 |
-
OBJECTIF : Tu dois réaliser le paragraphe ' 1 Contexte et objectifs ' du DIAGNOSTIC PRE INSTALLATION\n
|
| 26 |
-
|
| 27 |
-
CONTRAINTE : Tu dois le présenter rigoureusement de la façon suivante :
|
| 28 |
-
|
| 29 |
-
1. CONTEXTE ET OBJECTIFS\n
|
| 30 |
-
|
| 31 |
-
* Présentation de l’exploitation à reprendre (Historique/ situation actuelle)
|
| 32 |
-
[Section 01 : à compléter avec maximum 100 mots]\n
|
| 33 |
-
|
| 34 |
-
* Présentation du candidat / Parcours de vie
|
| 35 |
-
[Section 02 : à compléter avec maximum 100 mots]\n
|
| 36 |
-
|
| 37 |
-
* Motivation et présentation du projet du candidat
|
| 38 |
-
[Section 03 : à compléter avec maximum 60 mots]"
|
| 39 |
|
| 40 |
- name: "Statut social, juridique et fiscal"
|
| 41 |
num: 2
|
| 42 |
key: "social_legal_fiscal_status"
|
| 43 |
prompts:
|
| 44 |
- "Pré-remplis le diagnostique"
|
| 45 |
-
prompt_system: "
|
| 46 |
-
|
| 47 |
-
CONTEXTE / RESSOURCES :\n
|
| 48 |
-
Tu as accès à l'entretien que le conseiller a eu avec l'exploitant agricole. Cet entretien est fourni sous forme de transcript à cette conversation (voir pièce jointe)\n
|
| 49 |
-
\n
|
| 50 |
-
OBJECTIF :\n
|
| 51 |
-
Tu dois réaliser le paragraphe ' 2 Statut social, juridique et fiscal ' du DIAGNOSTIC PRE INSTALLATION\n
|
| 52 |
-
\n
|
| 53 |
-
CONTRAINTE :\n
|
| 54 |
-
Tu dois le présenter rigoureusement de la façon suivante :\n
|
| 55 |
-
\n
|
| 56 |
-
2. STATUT SOCIAL, JURIDIQUE ET FISCAL\n
|
| 57 |
-
\n
|
| 58 |
-
* Statut juridique Actuel
|
| 59 |
-
[Section 04 : à compléter avec maximum 20 mots]
|
| 60 |
-
|
| 61 |
-
* Projet
|
| 62 |
-
[Section 05 : à compléter avec maximum 20 mots]
|
| 63 |
-
|
| 64 |
-
* Évolutions juridiques possibles / Préconisations
|
| 65 |
-
[Section 06 :
|
| 66 |
-
-> sous section 06.01 'A partir de données de l'entretien fourni uniquement ' à compléter avec maximum 50 mots]
|
| 67 |
-
-> sous section 06.02 'Points clés à suggérer' à compléter avec maximum 10 mots]
|
| 68 |
-
|
| 69 |
-
* Évolutions sociales possibles / Préconisations
|
| 70 |
-
[Section 07 : à compléter avec maximum 30 mots]
|
| 71 |
-
|
| 72 |
-
* Évolutions mode de faire valoir possibles / Préconisations
|
| 73 |
-
[Section 08 : à compléter avec maximum 60 mots]"
|
| 74 |
|
| 75 |
- name: "Moyens humains"
|
| 76 |
num: 3
|
| 77 |
key: "human_resources"
|
| 78 |
prompts:
|
| 79 |
- "Pré-remplis le diagnostique"
|
| 80 |
-
prompt_system: "
|
| 81 |
-
|
| 82 |
-
CONTEXTE / RESSOURCES :\n
|
| 83 |
-
Tu as accès à l'entretien que le conseiller a eu avec l'exploitant agricole. Cet entretien est fourni sous forme de transcript à cette conversation (voir pièce jointe)\n
|
| 84 |
-
|
| 85 |
-
OBJECTIF :\n
|
| 86 |
-
Tu dois réaliser le paragraphe ' 3 Moyens humains ' du DIAGNOSTIC PRE INSTALLATION\n
|
| 87 |
-
|
| 88 |
-
CONTRAINTE :\n
|
| 89 |
-
Tu dois le présenter rigoureusement de la façon suivante :\n
|
| 90 |
-
|
| 91 |
-
3. MOYENS HUMAINS\n
|
| 92 |
-
|
| 93 |
-
* Composition de la main d'oeuvre (Historique/ situation actuelle)\n
|
| 94 |
-
[Section 09 : à compléter avec maximum 50 mots]\n
|
| 95 |
-
|
| 96 |
-
* Gestion du temps et organisation du travail (atouts / contraintes / Evolutions) \n
|
| 97 |
-
-> Section 10 : \n
|
| 98 |
-
-> sous section 10.01 : Atouts à compléter avec maximum 50 mots\n
|
| 99 |
-
-> sous section 10.02 : Contraintes à compléter avec maximum 50 mots\n
|
| 100 |
-
-> sous section 10.03 : Evolutions possibles à compléter avec maximum 80 mots\n"
|
| 101 |
|
| 102 |
- name: "Moyens de production"
|
| 103 |
num: 4
|
| 104 |
key: "production_resources"
|
| 105 |
prompts:
|
| 106 |
- "Pré-remplis le diagnostique"
|
| 107 |
-
prompt_system: "
|
| 108 |
-
|
| 109 |
-
CONTEXTE / RESSOURCES :\n
|
| 110 |
-
Tu as accès à l'entretien que le conseiller a eu avec l'exploitant agricole. Cet entretien est fourni sous forme de transcript à cette conversation (voir pièce jointe)\n
|
| 111 |
-
|
| 112 |
-
OBJECTIF :\n
|
| 113 |
-
Tu dois réaliser le paragraphe ' 4 Moyens de production ' du DIAGNOSTIC PRE INSTALLATION\n
|
| 114 |
-
|
| 115 |
-
CONTRAINTE :\n
|
| 116 |
-
Tu dois le présenter rigoureusement de la façon suivante :\n
|
| 117 |
-
|
| 118 |
-
4. MOYENS DE PRODUCTION\n
|
| 119 |
-
|
| 120 |
-
* Le foncier (Descriptif / atouts contraintes / Evolutions possibles et préconisation)\n
|
| 121 |
-
Section 11 : \n
|
| 122 |
-
-> sous section 11.01 : Description à compléter avec maximum 100 mots\n
|
| 123 |
-
-> sous section 11.02 : Atouts à compléter avec maximum 60 mots\n
|
| 124 |
-
-> sous section 11.03 : Contraintes à compléter avec maximum 60 mots\n
|
| 125 |
-
-> sous section 11.04 : Evolutions possibles / Préconisations à compléter avec maximum 100 mots\n
|
| 126 |
-
|
| 127 |
-
* Les Bâtiments (Descriptif / atouts contraintes / Evolutions possibles et préconisation)\n
|
| 128 |
-
Section 12 : \n
|
| 129 |
-
-> sous section 12.01 : Description à compléter avec maximum 60 mots\n
|
| 130 |
-
-> sous section 12.02 : Atouts à compléter avec maximum 30 mots\n
|
| 131 |
-
-> sous section 12.03 : Contraintes à compléter avec maximum 30 mots\n
|
| 132 |
-
-> sous section 12.04 : Evolutions possibles / Préconisations à compléter avec maximum 50 mots\n
|
| 133 |
-
|
| 134 |
-
* Le Matériel (Descriptif / atouts contraintes / Evolutions possibles et préconisation)\n
|
| 135 |
-
Section 13 : \n
|
| 136 |
-
-> sous section 13.01 : Description à compléter avec maximum 60 mots\n
|
| 137 |
-
-> sous section 13.02 : Atouts à compléter avec maximum 30 mots\n
|
| 138 |
-
-> sous section 13.03 : Contraintes à compléter avec maximum 30 mots\n
|
| 139 |
-
-> sous section 13.04 : Evolutions possibles / Préconisations à compléter avec maximum 50 mots\n
|
| 140 |
-
|
| 141 |
-
* Environnement de l’exploitation (partenaires : CUMA, fournisseurs, techniciens, …)\n
|
| 142 |
-
[Section 14 : à compléter avec maximum 50 mots]\n
|
| 143 |
-
|
| 144 |
-
* Dispositions environnementales et éco-conditionnalité :(État des réglementations et cahier des charges impactant l’exploitation : zonages, Ecophyto, Bio…)\n
|
| 145 |
-
[Section 15 : à compléter avec maximum 50 mots]\n
|
| 146 |
-
|
| 147 |
-
Gestion des risques (climatique / sanitaire / risque accident) :Comment ces risques sont anticipés\n
|
| 148 |
-
Section 16 : \n
|
| 149 |
-
-> sous section 16.01 : Comment le risque climatique est anticipé : à compléter avec maximum 60 mots\n
|
| 150 |
-
-> sous section 16.02 : Comment le risque sanitaire est anticipé : à compléter avec maximum 60 mots\n
|
| 151 |
-
-> sous section 16.01 : Comment le risque accident / maladie du chef d'exploitation est anticipé : à compléter avec maximum 60 mots\n
|
| 152 |
-
"
|
| 153 |
|
| 154 |
- name: "Production par atelier"
|
| 155 |
num: 5
|
| 156 |
key: "workshop_production"
|
| 157 |
prompts:
|
| 158 |
- "Pré-remplis le diagnostique"
|
| 159 |
-
prompt_system: "
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
|
| 164 |
-
|
| 165 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
|
|
|
|
|
|
| 171 |
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
|
|
|
|
|
|
|
|
|
| 175 |
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
|
| 183 |
|
| 184 |
prompt_system: "Prompt system par défaut"
|
|
|
|
| 18 |
key: "context_objectives"
|
| 19 |
prompts:
|
| 20 |
- "Pré-remplis le diagnostique"
|
| 21 |
+
prompt_system: ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
- name: "Statut social, juridique et fiscal"
|
| 24 |
num: 2
|
| 25 |
key: "social_legal_fiscal_status"
|
| 26 |
prompts:
|
| 27 |
- "Pré-remplis le diagnostique"
|
| 28 |
+
prompt_system: ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
- name: "Moyens humains"
|
| 31 |
num: 3
|
| 32 |
key: "human_resources"
|
| 33 |
prompts:
|
| 34 |
- "Pré-remplis le diagnostique"
|
| 35 |
+
prompt_system: ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
- name: "Moyens de production"
|
| 38 |
num: 4
|
| 39 |
key: "production_resources"
|
| 40 |
prompts:
|
| 41 |
- "Pré-remplis le diagnostique"
|
| 42 |
+
prompt_system: ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
- name: "Production par atelier"
|
| 45 |
num: 5
|
| 46 |
key: "workshop_production"
|
| 47 |
prompts:
|
| 48 |
- "Pré-remplis le diagnostique"
|
| 49 |
+
prompt_system: ""
|
| 50 |
+
|
| 51 |
+
- name: "Contexte et objectifs"
|
| 52 |
+
num: 11
|
| 53 |
+
key: "difficult_context_objectives"
|
| 54 |
+
prompts:
|
| 55 |
+
- "Pré-remplis le diagnostique"
|
| 56 |
+
prompt_system: ""
|
| 57 |
|
| 58 |
+
- name: "Statut social, juridique et fiscal"
|
| 59 |
+
num: 12
|
| 60 |
+
key: "difficult_social_legal_fiscal_status"
|
| 61 |
+
prompts:
|
| 62 |
+
- "Pré-remplis le diagnostique"
|
| 63 |
+
prompt_system: ""
|
| 64 |
|
| 65 |
+
- name: "Moyens humains"
|
| 66 |
+
num: 13
|
| 67 |
+
key: "difficult_human_resources"
|
| 68 |
+
prompts:
|
| 69 |
+
- "Pré-remplis le diagnostique"
|
| 70 |
+
prompt_system: ""
|
| 71 |
|
| 72 |
+
- name: "Moyens de production"
|
| 73 |
+
num: 14
|
| 74 |
+
key: "difficult_production_resources"
|
| 75 |
+
prompts:
|
| 76 |
+
- "Pré-remplis le diagnostique"
|
| 77 |
+
prompt_system: ""
|
| 78 |
|
| 79 |
+
- name: "Production par atelier"
|
| 80 |
+
num: 15
|
| 81 |
+
key: "difficult_workshop_production"
|
| 82 |
+
prompts:
|
| 83 |
+
- "Pré-remplis le diagnostique"
|
| 84 |
+
prompt_system: ""
|
| 85 |
|
| 86 |
|
| 87 |
prompt_system: "Prompt system par défaut"
|
pages/chap_11.py
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
from pages.chatbot import page
|
| 3 |
+
|
| 4 |
+
# Définir les paramètres à transmettre
|
| 5 |
+
st.session_state["current_page"] = 11
|
| 6 |
+
|
| 7 |
+
# Appeler la fonction page avec les paramètres
|
| 8 |
+
page()
|
pages/chap_12.py
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
from pages.chatbot import page
|
| 3 |
+
|
| 4 |
+
# Définir les paramètres à transmettre
|
| 5 |
+
st.session_state["current_page"] = 12
|
| 6 |
+
|
| 7 |
+
# Appeler la fonction page avec les paramètres
|
| 8 |
+
page()
|
pages/chap_13.py
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
from pages.chatbot import page
|
| 3 |
+
|
| 4 |
+
# Définir les paramètres à transmettre
|
| 5 |
+
st.session_state["current_page"] = 13
|
| 6 |
+
|
| 7 |
+
# Appeler la fonction page avec les paramètres
|
| 8 |
+
page()
|
pages/chap_14.py
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
from pages.chatbot import page
|
| 3 |
+
|
| 4 |
+
# Définir les paramètres à transmettre
|
| 5 |
+
st.session_state["current_page"] = 14
|
| 6 |
+
|
| 7 |
+
# Appeler la fonction page avec les paramètres
|
| 8 |
+
page()
|
pages/chap_15.py
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
from pages.chatbot import page
|
| 3 |
+
|
| 4 |
+
# Définir les paramètres à transmettre
|
| 5 |
+
st.session_state["current_page"] = 15
|
| 6 |
+
|
| 7 |
+
# Appeler la fonction page avec les paramètres
|
| 8 |
+
page()
|
pages/chapter_params.py
CHANGED
|
@@ -14,8 +14,7 @@ def area_change(key, ):
|
|
| 14 |
def page():
|
| 15 |
st.subheader("Définissez vos paramètres")
|
| 16 |
|
| 17 |
-
type = "Installation"
|
| 18 |
-
# type = st.selectbox("Type de diagnostique ?", ["Installation", "Difficulté"], key="mode")
|
| 19 |
if(type == "Installation"):
|
| 20 |
diag_type = "installation"
|
| 21 |
else:
|
|
|
|
| 14 |
def page():
|
| 15 |
st.subheader("Définissez vos paramètres")
|
| 16 |
|
| 17 |
+
type = st.selectbox("Type de diagnostique", ["Installation", "Difficulté"], key="mode")
|
|
|
|
| 18 |
if(type == "Installation"):
|
| 19 |
diag_type = "installation"
|
| 20 |
else:
|