Spaces:
Running
Running
phyloforfun
commited on
Commit
·
b769563
1
Parent(s):
e9f4039
file upload
Browse files
app.py
CHANGED
@@ -87,6 +87,7 @@ def setup_streamlit_config(dir_home):
|
|
87 |
enableStaticServing = false
|
88 |
runOnSave = true
|
89 |
port = 8524
|
|
|
90 |
"""
|
91 |
|
92 |
with open(file_path, "w") as f:
|
@@ -1071,6 +1072,13 @@ def content_tab_settings():
|
|
1071 |
selected_version = default_version
|
1072 |
st.session_state.config['leafmachine']['project']['prompt_version'] = st.selectbox("Prompt Version", versions, index=versions.index(selected_version))
|
1073 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1074 |
# if st.session_state.config['leafmachine']['LLM_version'] in ["GPT 4", "GPT 3.5", "Azure GPT 4", "Azure GPT 3.5",]:
|
1075 |
# st.session_state.config['leafmachine']['project']['prompt_version'] = st.selectbox("Prompt Version", ["Version 1", "Version 1 No Domain Knowledge", "Version 2"], index=["Version 1", "Version 1 No Domain Knowledge", "Version 2"].index(st.session_state.config['leafmachine']['project'].get('prompt_version', "Version 2")))
|
1076 |
# elif st.session_state.config['leafmachine']['LLM_version'] in ["PaLM 2",]:
|
|
|
87 |
enableStaticServing = false
|
88 |
runOnSave = true
|
89 |
port = 8524
|
90 |
+
maxUploadSize = 5000
|
91 |
"""
|
92 |
|
93 |
with open(file_path, "w") as f:
|
|
|
1072 |
selected_version = default_version
|
1073 |
st.session_state.config['leafmachine']['project']['prompt_version'] = st.selectbox("Prompt Version", versions, index=versions.index(selected_version))
|
1074 |
|
1075 |
+
with col_local_2:
|
1076 |
+
uploaded_files = st.file_uploader("Upload Images", accept_multiple_files=True)
|
1077 |
+
for uploaded_file in uploaded_files:
|
1078 |
+
print(uploaded_file)
|
1079 |
+
bytes_data = uploaded_file.read()
|
1080 |
+
st.write("filename:", uploaded_file.name)
|
1081 |
+
st.write(bytes_data)
|
1082 |
# if st.session_state.config['leafmachine']['LLM_version'] in ["GPT 4", "GPT 3.5", "Azure GPT 4", "Azure GPT 3.5",]:
|
1083 |
# st.session_state.config['leafmachine']['project']['prompt_version'] = st.selectbox("Prompt Version", ["Version 1", "Version 1 No Domain Knowledge", "Version 2"], index=["Version 1", "Version 1 No Domain Knowledge", "Version 2"].index(st.session_state.config['leafmachine']['project'].get('prompt_version', "Version 2")))
|
1084 |
# elif st.session_state.config['leafmachine']['LLM_version'] in ["PaLM 2",]:
|