File size: 724 Bytes
3df6d28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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.")