Spaces:
Sleeping
Sleeping
MatteoScript
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -52,7 +52,7 @@ def init_state() :
|
|
52 |
|
53 |
def sidebar() :
|
54 |
def retrieval_settings() :
|
55 |
-
st.markdown("# Prompt")
|
56 |
st.session_state.selected_option_key = st.selectbox('Azione', list(options.keys()) + ['Personalizzata'])
|
57 |
st.session_state.selected_option = options.get(st.session_state.selected_option_key, {})
|
58 |
st.session_state.systemRole = st.session_state.selected_option.get('systemRole', '')
|
@@ -62,11 +62,15 @@ def sidebar() :
|
|
62 |
st.session_state.instruction = st.session_state.selected_option.get('instruction', '')
|
63 |
st.session_state.rag_enabled = st.session_state.selected_option.get('RAG', '')
|
64 |
if st.session_state.selected_option_key == 'Decreti':
|
65 |
-
|
|
|
|
|
|
|
|
|
66 |
st.markdown("---")
|
67 |
|
68 |
def model_settings() :
|
69 |
-
st.markdown("# Modello")
|
70 |
st.session_state.chat_bot = st.sidebar.radio('Seleziona Modello:', [key for key, value in CHAT_BOTS.items() ])
|
71 |
st.session_state.temp = st.slider(label="Creatività", min_value=0.0, max_value=1.0, step=0.1, value=0.9)
|
72 |
st.session_state.max_tokens = st.slider(label="Lunghezza Output", min_value = 64, max_value=2048, step= 32, value=1024)
|
|
|
52 |
|
53 |
def sidebar() :
|
54 |
def retrieval_settings() :
|
55 |
+
st.markdown("# Impostazioni Prompt")
|
56 |
st.session_state.selected_option_key = st.selectbox('Azione', list(options.keys()) + ['Personalizzata'])
|
57 |
st.session_state.selected_option = options.get(st.session_state.selected_option_key, {})
|
58 |
st.session_state.systemRole = st.session_state.selected_option.get('systemRole', '')
|
|
|
62 |
st.session_state.instruction = st.session_state.selected_option.get('instruction', '')
|
63 |
st.session_state.rag_enabled = st.session_state.selected_option.get('RAG', '')
|
64 |
if st.session_state.selected_option_key == 'Decreti':
|
65 |
+
st.session_state.top_k = st.slider(label="Documenti da ricercare", min_value=1, max_value=20, value=4, disabled=not st.session_state.rag_enabled)
|
66 |
+
st.session_state.decreti_escludere = st.multiselect(
|
67 |
+
'Decreti da escludere',
|
68 |
+
['23.10.2 destinazione risorse residue pnrr DGR 1051-2023_Destinazione risorse PNRR Duale.pdf', '23.10.25 accompagnatoria Circolare Inail assicurazione.pdf', '23.10.26 circolare Inail assicurazione.pdf', '23.10.3 FAQ in attesa di avviso_.pdf', '23.11.2 avviso 24_24 Decreto 17106-2023 Approvazione Avviso IeFP 2023-2024.pdf', '23.5.15 decreto linee inclusione x enti locali.pdf', '23.6.21 Circolare+esplicativa+DGR+312-2023.pdf', '23.7.3 1° Decreto R.L. 23_24 .pdf', '23.9 Regolamento_prevenzione_bullismo_e_cyberbullismo__Centro_Bonsignori.pdf', '23.9.1 FAQ inizio anno formativo.pdf', '23.9.15 DECRETO VERIFICHE AMMINISTR 15-09-23.pdf', '23.9.4 modifica decreto GRS.pdf', '23.9.8 Budget 23_24.pdf', '24.10.2022 DECRETO loghi N.15176.pdf', 'ALLEGATO C_Scheda Supporti al funzionamento.pdf', 'ALLEGATO_ B_ Linee Guida.pdf', 'ALLEGATO_A1_PEI_INFANZIA.pdf', 'ALLEGATO_A2_PEI_PRIMARIA.pdf', 'ALLEGATO_A3_PEI_SEC_1_GRADO.pdf', 'ALLEGATO_A4_PEI_SEC_2_GRADO.pdf', 'ALLEGATO_C_1_Tabella_Fabbisogni.pdf', 'Brand+Guidelines+FSE+.pdf', 'Decreto 20797 del 22-12-2023_Aggiornamento budget PNRR.pdf', 'Decreto 20874 del 29-12-2023 Avviso IeFP PNRR 2023-2024_file unico.pdf'],
|
69 |
+
[])
|
70 |
st.markdown("---")
|
71 |
|
72 |
def model_settings() :
|
73 |
+
st.markdown("# Impostazioni Modello")
|
74 |
st.session_state.chat_bot = st.sidebar.radio('Seleziona Modello:', [key for key, value in CHAT_BOTS.items() ])
|
75 |
st.session_state.temp = st.slider(label="Creatività", min_value=0.0, max_value=1.0, step=0.1, value=0.9)
|
76 |
st.session_state.max_tokens = st.slider(label="Lunghezza Output", min_value = 64, max_value=2048, step= 32, value=1024)
|