Anne31415 commited on
Commit
52f283a
·
verified ·
1 Parent(s): 3c6fd84

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -20,9 +20,7 @@ import pandas as pd
20
  import pydeck as pdk
21
  from urllib.error import URLError
22
 
23
- import chromadb
24
- client = chromadb.Client()
25
- collection = chroma_client.create_collection(name="Kosten_Strukturdaten")
26
 
27
  # Initialize session state variables
28
  if 'chat_history_page1' not in st.session_state:
@@ -74,12 +72,12 @@ api_key = os.getenv("OPENAI_API_KEY")
74
 
75
  import chromadb
76
 
77
- # Corrected variable name for consistency
78
  chroma_client = chromadb.Client()
79
 
80
- # Create a collection for your embeddings
81
- collection_name = "Kosten_Strukturdaten"
82
- collection = chroma_client.create_collection(name=collection_name)
83
 
84
  # Function to extract text from a PDF file
85
  def extract_text_from_pdf(pdf_path):
 
20
  import pydeck as pdk
21
  from urllib.error import URLError
22
 
23
+
 
 
24
 
25
  # Initialize session state variables
26
  if 'chat_history_page1' not in st.session_state:
 
72
 
73
  import chromadb
74
 
75
+ # Initialize CromA client
76
  chroma_client = chromadb.Client()
77
 
78
+ # Later in your code, use chroma_client to create a collection
79
+ collection = chroma_client.create_collection(name="Kosten_Strukturdaten")
80
+
81
 
82
  # Function to extract text from a PDF file
83
  def extract_text_from_pdf(pdf_path):