File size: 849 Bytes
87c3140
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import streamlit.web.cli as stcli
import os, sys

# Insert a file uploader that accepts multiple files at a time:
# import streamlit as st
# uploaded_files = st.file_uploader("Choose a CSV file", accept_multiple_files=True)
# for uploaded_file in uploaded_files:
#     bytes_data = uploaded_file.read()
#     st.write("filename:", uploaded_file.name)
#     st.write(bytes_data)


def resolve_path(path):
    resolved_path = os.path.abspath(os.path.join(os.getcwd(), path))
    return resolved_path


if __name__ == "__main__":
    dir_home = os.path.dirname(__file__)

    # pip install protobuf==3.20.0

    sys.argv = [
        "streamlit",
        "run",
        resolve_path(os.path.join(dir_home,"vouchervision", "VoucherVision_GUI.py")),
        "--global.developmentMode=false",
        "--server.port=8525",

    ]
    sys.exit(stcli.main())