cryogenic22 commited on
Commit
025e536
Β·
verified Β·
1 Parent(s): a3bfa6a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -188,14 +188,19 @@ def main():
188
  st.error(f"Error loading cases: {str(e)}")
189
 
190
  # Tab 2: Document Analysis
 
191
  elif tab == "πŸ“„ Document Analysis":
192
  st.title("πŸ“„ Document Analysis")
193
  try:
194
- notebook = LegalNotebookInterface(case_manager, vector_store, doc_processor)
195
- notebook.render()
 
 
 
 
196
  except Exception as e:
197
  st.error(f"Error initializing document analysis: {str(e)}")
198
-
199
  # Tab 3: Legal Assistant
200
  elif tab == "πŸ€– Legal Assistant":
201
  st.title("πŸ€– AI Legal Assistant")
 
188
  st.error(f"Error loading cases: {str(e)}")
189
 
190
  # Tab 2: Document Analysis
191
+ # In the Document Analysis tab section
192
  elif tab == "πŸ“„ Document Analysis":
193
  st.title("πŸ“„ Document Analysis")
194
  try:
195
+ cases = case_manager.get_all_cases()
196
+ if not cases:
197
+ st.info("Please create a case and add documents first.")
198
+ else:
199
+ notebook = LegalNotebookInterface(case_manager, vector_store, doc_processor)
200
+ notebook.render()
201
  except Exception as e:
202
  st.error(f"Error initializing document analysis: {str(e)}")
203
+
204
  # Tab 3: Legal Assistant
205
  elif tab == "πŸ€– Legal Assistant":
206
  st.title("πŸ€– AI Legal Assistant")