sahilnishad commited on
Commit
6a59ce6
·
verified ·
1 Parent(s): 8854f68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -34,10 +34,11 @@ def data_ingestion(filepath):
34
  embeddings = model.encoder(**inputs).last_hidden_state.mean(dim=1).cpu().numpy()
35
  return embeddings
36
 
37
- db = Chroma.from_documents(texts, embedding_function=embedding_function, persist_directory="db")
38
  db.persist()
39
  db = None
40
 
 
41
  @st.cache_resource
42
  def llm_pipeline():
43
  pipe = pipeline(
 
34
  embeddings = model.encoder(**inputs).last_hidden_state.mean(dim=1).cpu().numpy()
35
  return embeddings
36
 
37
+ db = Chroma.from_documents(texts, persist_directory="db", embedding_function=embedding_function)
38
  db.persist()
39
  db = None
40
 
41
+
42
  @st.cache_resource
43
  def llm_pipeline():
44
  pipe = pipeline(