cryogenic22 commited on
Commit
676d600
·
verified ·
1 Parent(s): 4d44057

Update components/collection_manager.py

Browse files
Files changed (1) hide show
  1. components/collection_manager.py +11 -3
components/collection_manager.py CHANGED
@@ -1,7 +1,15 @@
1
  # components/collection_manager.py
2
 
 
3
 
4
- # components/collection_manager.py
 
 
 
 
 
 
 
5
 
6
  def show_collection_creation_dialog():
7
  """Show dialog for creating a new collection."""
@@ -66,7 +74,7 @@ def display_enhanced_collections():
66
  collections = get_collections(st.session_state.db_conn)
67
  if search_query:
68
  collections = [c for c in collections
69
- if search_query.lower() in c['name'].lower()]
70
 
71
  st.divider()
72
 
@@ -140,4 +148,4 @@ def display_collection_content(collection):
140
 
141
  for doc in documents:
142
  with st.expander(f"📄 {doc['name']}", expanded=False):
143
- enhanced_document_preview(doc)
 
1
  # components/collection_manager.py
2
 
3
+ import streamlit as st # Import Streamlit here
4
 
5
+ from utils.database import (
6
+ get_all_documents,
7
+ create_collection,
8
+ add_document_to_collection,
9
+ get_collections,
10
+ search_documents,
11
+ get_collection_documents,
12
+ )
13
 
14
  def show_collection_creation_dialog():
15
  """Show dialog for creating a new collection."""
 
74
  collections = get_collections(st.session_state.db_conn)
75
  if search_query:
76
  collections = [c for c in collections
77
+ if search_query.lower() in c['name'].lower()]
78
 
79
  st.divider()
80
 
 
148
 
149
  for doc in documents:
150
  with st.expander(f"📄 {doc['name']}", expanded=False):
151
+ enhanced_document_preview(doc)