Spaces:
Runtime error
Runtime error
keep url as it is
Browse files
app.py
CHANGED
@@ -14,12 +14,11 @@ if "messages" not in st.session_state:
|
|
14 |
if "uploader_key" not in st.session_state:
|
15 |
st.session_state["uploader_key"] = 0
|
16 |
|
17 |
-
if "id" in st.query_params:
|
18 |
with st.spinner("Loading chat..."):
|
19 |
id = st.query_params["id"]
|
20 |
data = get_file(id, 'chatgpt-vision-007')
|
21 |
st.session_state.messages = pickle.loads(data)
|
22 |
-
st.query_params.clear()
|
23 |
|
24 |
def clear_uploader():
|
25 |
st.session_state["uploader_key"] += 1
|
|
|
14 |
if "uploader_key" not in st.session_state:
|
15 |
st.session_state["uploader_key"] = 0
|
16 |
|
17 |
+
if len(st.session_state.messages) == 0 and "id" in st.query_params:
|
18 |
with st.spinner("Loading chat..."):
|
19 |
id = st.query_params["id"]
|
20 |
data = get_file(id, 'chatgpt-vision-007')
|
21 |
st.session_state.messages = pickle.loads(data)
|
|
|
22 |
|
23 |
def clear_uploader():
|
24 |
st.session_state["uploader_key"] += 1
|