File size: 811 Bytes
d9ce745
232a10d
 
d9ce745
 
 
4268ace
232a10d
4268ace
232a10d
d9ce745
232a10d
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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!')