-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
61 lines (51 loc) · 1.48 KB
/
app.py
File metadata and controls
61 lines (51 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
"""Home page shown when users enter the application"""
import streamlit as st
import pages.overview
import pages.example
import pandas as pd
import numpy as np
PAGES = {
"Overview": pages.overview,
"Example": pages.example
}
def main():
"""Main function of the App"""
pl = st.empty()
pl.markdown('''
<html>
<body style="background-color:#EB3A42;">
<h1 align="center" style="color:white;">SumSwift Demo V0.1</h1>
</body>
</html>
''',unsafe_allow_html=True)
# st.image('unpackai.jpeg',width=220)
pl2 = st.empty()
pl2.markdown('''
<marquee style='width: 100%; color: black;
font-family: "Microsoft YaHei", Arial, serif;'>
<b>Text Summarization for Chinese</b>
</marquee>
''',unsafe_allow_html=True)
password = st.sidebar.text_input('Please enter your password','')
if password =='sumswift':
pl2.empty()
# place_holder.empty()
# df = load_data(file_ID)
st.sidebar.subheader("Navigation")
selection = st.sidebar.radio("", list(PAGES.keys()))
page = PAGES[selection]
with st.spinner(f'Loading {selection} ...'):
# pl.empty()
page.write()
st.sidebar.title("About")
st.sidebar.info(
"""
This demo is for Demonstrating sumswift functions
"""
)
elif password =='':
pass
else:
st.sidebar.warning('Incorrect password')
if __name__ == "__main__":
main()