aminaj commited on
Commit
261922f
·
verified ·
1 Parent(s): 7b2a1ba

Update BrainBot.py

Browse files
Files changed (1) hide show
  1. BrainBot.py +11 -11
BrainBot.py CHANGED
@@ -128,17 +128,17 @@ if uploaded_file is not None:
128
  temp_file_path = save_uploaded_file(uploaded_file)
129
  st.write(temp_file_path)
130
 
131
- try:
132
- # Send POST request to a FastAPI endpoint to load the file into a vectorstore
133
- data = {"file_path": temp_file_path, "file_type": uploaded_file.type}
134
- FASTAPI_URL = f"http://localhost:7860/load_file/{llm}"
135
- response = requests.post(FASTAPI_URL, json=data)
136
- st.success(response.text)
137
- st.session_state['current_file'] = uploaded_file.name
138
- st.session_state['uploaded_file'] = True
139
- st.switch_page("pages/File-chat.py")
140
- except Exception as e:
141
- st.switch_page("pages/error.py")
142
 
143
  ## IMAGE
144
  ## -------------------------------------------------------------------------------------------
 
128
  temp_file_path = save_uploaded_file(uploaded_file)
129
  st.write(temp_file_path)
130
 
131
+ # try:
132
+ # # Send POST request to a FastAPI endpoint to load the file into a vectorstore
133
+ # data = {"file_path": temp_file_path, "file_type": uploaded_file.type}
134
+ # FASTAPI_URL = f"http://localhost:7860/load_file/{llm}"
135
+ # response = requests.post(FASTAPI_URL, json=data)
136
+ # st.success(response.text)
137
+ # st.session_state['current_file'] = uploaded_file.name
138
+ # st.session_state['uploaded_file'] = True
139
+ # st.switch_page("pages/File-chat.py")
140
+ # except Exception as e:
141
+ # st.switch_page("pages/error.py")
142
 
143
  ## IMAGE
144
  ## -------------------------------------------------------------------------------------------