text-matching / app.py
Keane Moraes
extracting keywords from texts
232a10d
raw
history blame
811 Bytes
import streamlit as st
from generation import Insights
import time
st.title("Drop the first document")
file1 = st.file_uploader("Upload a file", type=["md", "txt"], key="first")
st.title("Drop the second document")
file2 = st.file_uploader("Upload a file", type=["md", "txt"], key="second")
if file1 is not None and file2 is not None:
st.title("Contents of the first file")
st.title("Contents of the second file")
st.title("Generating insights")
with st.spinner('Generating insights...'):
insight1 = Insights(file1.read().decode("utf-8"))
insight2 = Insights(file2.read().decode("utf-8"))
st.write(insight1.text)
st.write(insight2.text)
st.write(insight1.generate_topics())
st.write(insight2.generate_topics())
st.success('Done!')