Darshika94 commited on
Commit
14e09f9
Β·
verified Β·
1 Parent(s): 98899c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -0
app.py CHANGED
@@ -27,6 +27,27 @@ from dotenv import load_dotenv
27
 
28
  load_dotenv()
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  # Streamlit Settings
31
  st.set_page_config(page_title="Chat with documents πŸ“š", page_icon="πŸ“š")
32
  st.title("Chat with documents πŸ“š")
 
27
 
28
  load_dotenv()
29
 
30
+ #NEW
31
+ import streamlit as st
32
+
33
+ # Try importing scipy and other required libraries
34
+ try:
35
+ import scipy
36
+ st.success("Scipy is installed!")
37
+ except ImportError as e:
38
+ st.error("Scipy is not installed. Please make sure to install it before running the app.")
39
+ st.stop() # Stop further execution of the app
40
+
41
+ # You can also check for other libraries in a similar way
42
+ try:
43
+ import pypdf
44
+ import langchain
45
+ import torch
46
+ except ImportError as e:
47
+ st.error(f"Error importing: {e}. Make sure all dependencies are installed.")
48
+ st.stop()
49
+ #NEW
50
+
51
  # Streamlit Settings
52
  st.set_page_config(page_title="Chat with documents πŸ“š", page_icon="πŸ“š")
53
  st.title("Chat with documents πŸ“š")