Spaces:
Sleeping
Sleeping
minor debugging
Browse files- frontend/app.py +2 -5
- requirements.txt +1 -1
frontend/app.py
CHANGED
@@ -30,14 +30,11 @@ with st.sidebar:
|
|
30 |
uploaded_file = st.file_uploader("Upload Document (PDF/TXT)", type=["pdf", "txt"])
|
31 |
if uploaded_file:
|
32 |
if st.button("Upload Document"):
|
33 |
-
files = {"file": (uploaded_file.name, uploaded_file, uploaded_file.type)}
|
34 |
-
data = {"session_id": st.session_state.session_id}
|
35 |
response = requests.post(
|
36 |
f"{BACKEND_URL}/upload-doc",
|
37 |
-
files=
|
38 |
-
data=
|
39 |
)
|
40 |
-
print(response.status_code)
|
41 |
if response.status_code == 200:
|
42 |
data = response.json()
|
43 |
st.session_state.current_file = data["file_id"]
|
|
|
30 |
uploaded_file = st.file_uploader("Upload Document (PDF/TXT)", type=["pdf", "txt"])
|
31 |
if uploaded_file:
|
32 |
if st.button("Upload Document"):
|
|
|
|
|
33 |
response = requests.post(
|
34 |
f"{BACKEND_URL}/upload-doc",
|
35 |
+
files={"file": (uploaded_file.name, uploaded_file, "application/octet-stream")},
|
36 |
+
data={"session_id": st.session_state.session_id}
|
37 |
)
|
|
|
38 |
if response.status_code == 200:
|
39 |
data = response.json()
|
40 |
st.session_state.current_file = data["file_id"]
|
requirements.txt
CHANGED
@@ -143,7 +143,7 @@ tenacity==9.1.2
|
|
143 |
tiktoken==0.9.0
|
144 |
tokenizers==0.21.1
|
145 |
toml==0.10.2
|
146 |
-
tornado
|
147 |
tqdm==4.67.1
|
148 |
typer==0.16.0
|
149 |
typing-inspect==0.9.0
|
|
|
143 |
tiktoken==0.9.0
|
144 |
tokenizers==0.21.1
|
145 |
toml==0.10.2
|
146 |
+
tornado<=6.4.2
|
147 |
tqdm==4.67.1
|
148 |
typer==0.16.0
|
149 |
typing-inspect==0.9.0
|