Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,8 @@ from plotly.subplots import make_subplots
|
|
10 |
from streamlit_extras.add_vertical_space import add_vertical_space
|
11 |
from streamlit_extras.stylable_container import stylable_container
|
12 |
from streamlit_option_menu import option_menu
|
|
|
|
|
13 |
|
14 |
# Configuração da página
|
15 |
st.set_page_config(
|
@@ -148,6 +150,7 @@ with st.sidebar:
|
|
148 |
"Tratamentos",
|
149 |
"Efeitos Colaterais",
|
150 |
"Chatbot Dr. Karl",
|
|
|
151 |
],
|
152 |
icons=[
|
153 |
"house",
|
@@ -155,6 +158,7 @@ with st.sidebar:
|
|
155 |
"capsule",
|
156 |
"exclamation-triangle",
|
157 |
"chat-dots",
|
|
|
158 |
],
|
159 |
menu_icon="cast",
|
160 |
default_index=0,
|
@@ -1420,6 +1424,71 @@ elif selected == "Chatbot Dr. Karl":
|
|
1420 |
)
|
1421 |
# Aqui irá a estrutura para o chatbot
|
1422 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1423 |
|
1424 |
footer="""<style>
|
1425 |
a:link , a:visited{
|
|
|
10 |
from streamlit_extras.add_vertical_space import add_vertical_space
|
11 |
from streamlit_extras.stylable_container import stylable_container
|
12 |
from streamlit_option_menu import option_menu
|
13 |
+
import streamlit.components.v1 as components
|
14 |
+
|
15 |
|
16 |
# Configuração da página
|
17 |
st.set_page_config(
|
|
|
150 |
"Tratamentos",
|
151 |
"Efeitos Colaterais",
|
152 |
"Chatbot Dr. Karl",
|
153 |
+
"Mapas mentais",
|
154 |
],
|
155 |
icons=[
|
156 |
"house",
|
|
|
158 |
"capsule",
|
159 |
"exclamation-triangle",
|
160 |
"chat-dots",
|
161 |
+
"map",
|
162 |
],
|
163 |
menu_icon="cast",
|
164 |
default_index=0,
|
|
|
1424 |
)
|
1425 |
# Aqui irá a estrutura para o chatbot
|
1426 |
|
1427 |
+
elif selected == "Mapas Mentais":
|
1428 |
+
st.title("🧠 Mapas Mentais Interativos")
|
1429 |
+
|
1430 |
+
ans = 'https://www.mindomo.com/mindmap/sx-de-ax-medo-evitao-ou-alerta-7b7c0a68be8f492aada5e7370b09f5b1'
|
1431 |
+
farm = 'https://www.mindomo.com/mindmap/-isrs-inibidores-seletivos-da-recaptao-de-serotonina-fb9e42a9a7db438ca001f1fc1e7181be'
|
1432 |
+
sumula = 'https://www.mindomo.com/mindmap/smula-psicopatolgica-00738aa02ebc4d0da0e53b1551780293'
|
1433 |
+
|
1434 |
+
st.markdown("""
|
1435 |
+
<style>
|
1436 |
+
.big-font {
|
1437 |
+
font-size:20px !important;
|
1438 |
+
font-weight: bold;
|
1439 |
+
}
|
1440 |
+
.stRadio [role=radiogroup]{
|
1441 |
+
flex-direction: row;
|
1442 |
+
align-items: flex-start;
|
1443 |
+
gap: 40px;
|
1444 |
+
}
|
1445 |
+
</style>
|
1446 |
+
""", unsafe_allow_html=True)
|
1447 |
+
|
1448 |
+
st.markdown('<p class="big-font">Escolha um mapa mental para explorar:</p>', unsafe_allow_html=True)
|
1449 |
+
|
1450 |
+
mapa_selecionado = st.radio(
|
1451 |
+
"Selecione um mapa mental:",
|
1452 |
+
["😰 Ansiedade", "💊 Farmacologia", "📚 Súmula Psicopatológica"],
|
1453 |
+
label_visibility='collapsed',
|
1454 |
+
horizontal=True,
|
1455 |
+
key="mapa_mental_radio"
|
1456 |
+
)
|
1457 |
+
|
1458 |
+
# Descrições dos mapas
|
1459 |
+
st.markdown("""
|
1460 |
+
- **Ansiedade**: Sx de Ax: Medo, Evitação ou Alerta
|
1461 |
+
- **Farmacologia**: ISRSs: Inibidores Seletivos da Recaptação de Serotonina
|
1462 |
+
- **Súmula Psicopatológica**: Visão geral da Psicopatologia
|
1463 |
+
""")
|
1464 |
+
|
1465 |
+
# Função para exibir o mapa mental
|
1466 |
+
@st.fragment
|
1467 |
+
def exibir_mapa(url):
|
1468 |
+
return components.iframe(url, height=900, width=1600)
|
1469 |
+
|
1470 |
+
# Seleção do mapa com base na escolha do usuário
|
1471 |
+
if mapa_selecionado == "😰 Ansiedade":
|
1472 |
+
mapa_url = ans
|
1473 |
+
mapa_titulo = "😰 Mapa Mental: Ansiedade"
|
1474 |
+
elif mapa_selecionado == "💊 Farmacologia":
|
1475 |
+
mapa_url = farm
|
1476 |
+
mapa_titulo = "💊 Mapa Mental: Farmacologia (ISRSs)"
|
1477 |
+
elif mapa_selecionado == "📚 Súmula Psicopatológica":
|
1478 |
+
mapa_url = sumula
|
1479 |
+
mapa_titulo = "📚 Mapa Mental: Súmula Psicopatológica"
|
1480 |
+
else:
|
1481 |
+
st.warning("⚠️ Por favor, selecione um mapa mental para visualizar.")
|
1482 |
+
st.stop()
|
1483 |
+
|
1484 |
+
# Exibir o mapa selecionado
|
1485 |
+
st.subheader(mapa_titulo)
|
1486 |
+
with st.expander("🔍 Clique para expandir/recolher o mapa", expanded=False):
|
1487 |
+
exibir_mapa(mapa_url)
|
1488 |
+
|
1489 |
+
st.info("ℹ️ Dica: Clique com botão esquerdo do muse e arraste para mover o mapa, pressione CTRL e use a roda do mouse para dar zoom.")
|
1490 |
+
|
1491 |
+
|
1492 |
|
1493 |
footer="""<style>
|
1494 |
a:link , a:visited{
|