baderanas commited on
Commit
52ba610
·
verified ·
1 Parent(s): 0b2d855

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -1,4 +1,11 @@
 
1
  import os
 
 
 
 
 
 
2
  import streamlit as st
3
  from chroma_operations.ingestion import ingest
4
  from rag import ask_question
@@ -286,4 +293,4 @@ with tab3:
286
  else:
287
  st.info("No files to delete.")
288
  except Exception as e:
289
- st.error(f"Error during bulk deletion: {e}")
 
1
+ # Import required environment settings before any other imports
2
  import os
3
+ import sys
4
+
5
+ # Set environment variable to prevent PyTorch custom class loading issues
6
+ os.environ["PYTORCH_DISABLE_CUSTOM_CLASS_LOADING"] = "1"
7
+
8
+ # Now import streamlit and other dependencies
9
  import streamlit as st
10
  from chroma_operations.ingestion import ingest
11
  from rag import ask_question
 
293
  else:
294
  st.info("No files to delete.")
295
  except Exception as e:
296
+ st.error(f"Error during bulk deletion: {e}")