IOI-RUN / componentes.py
Roudrigus's picture
Upload 82 files
0f0ef8d verified
raw
history blame contribute delete
575 Bytes
import streamlit as st
FPSO_PADRAO = [
"CDA",
"CDP",
"CDM",
"ADG",
"ESS",
"SEP",
"CDI",
"ATD",
"CDS"
]
def campo_fpso(label, key):
"""
Campo FPSO com sugestões + opção de texto livre
"""
opcoes = [""] + FPSO_PADRAO + ["Outro"]
escolha = st.selectbox(
label,
opcoes,
key=f"{key}_select"
)
if escolha == "Outro":
return st.text_input(
f"{label} (digite)",
key=f"{key}_texto"
).strip()
return escolha