Spaces:
Running
Running
Major update. Support for 15 LLMs, World Flora Online taxonomy validation, geolocation, 2 OCR methods, significant UI changes, stability improvements, consistent JSON parsing
b8abf64
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) | |
# pip install protobuf==3.20.0 | |
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,"app.py")), | |
# resolve_path(os.path.join(dir_home,"vouchervision", "VoucherVision_GUI.py")), | |
"--global.developmentMode=false", | |
# "--server.port=8545", | |
"--server.port=8546", | |
# Toggle below for HF vs Local | |
# "--is_hf=1", | |
# "--is_hf=0", | |
] | |
sys.exit(stcli.main()) |