import streamlit as st from explain_utils import translate_text, simplify_text st.set_page_config(page_title="NASA Report Simplifier", layout="wide") st.title("Simplificador de Reportes Científicos de NASA") st.markdown("Sube un texto técnico o artículo y conviértelo a lenguaje sencillo.") input_text = st.text_area("Pega el contenido científico aquí:", height=300) if st.button("Simplificar"): if input_text.strip(): with st.spinner("Procesando..."): translated = translate_text(input_text) simplified = simplify_text(translated) st.subheader("Texto simplificado:") st.write(simplified) else: st.warning("Por favor, ingresa algún texto.")