Total Complexity | 4 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | # Author: Simon Blanke |
||
2 | # Email: [email protected] |
||
3 | # License: MIT License |
||
4 | |||
5 | import sys |
||
6 | import time |
||
7 | import streamlit as st |
||
8 | |||
9 | |||
10 | from streamlit_backend import StreamlitBackend |
||
11 | |||
12 | |||
13 | def main(): |
||
14 | try: |
||
15 | st.set_page_config(page_title="Hyperactive Progress Board", layout="wide") |
||
16 | except: |
||
17 | pass |
||
18 | |||
19 | search_ids = sys.argv[1:] |
||
20 | backend = StreamlitBackend(search_ids) |
||
21 | |||
22 | for search_id in search_ids: |
||
23 | st.title(search_id) |
||
24 | st.components.v1.html( |
||
25 | """<hr style="height:1px;border:none;color:#333;background-color:#333;" /> """, |
||
26 | height=10, |
||
27 | ) |
||
28 | col1, col2 = st.beta_columns([1, 2]) |
||
29 | |||
30 | pyplot_fig, plotly_fig = backend.create_plots(search_id) |
||
31 | |||
32 | col1.pyplot(pyplot_fig) |
||
33 | col2.plotly_chart(plotly_fig) |
||
34 | |||
35 | for _ in range(3): |
||
36 | st.write(" ") |
||
37 | |||
38 | time.sleep(1) |
||
39 | st.experimental_rerun() |
||
40 | |||
41 | |||
42 | if __name__ == "__main__": |
||
43 | main() |
||
44 |