bstraehle commited on
Commit
da541cc
1 Parent(s): a426126

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -60,11 +60,11 @@ def document_loading_splitting():
60
  loader = WebBaseLoader(WEB_URL_1)
61
  docs.extend(loader.load())
62
  # Load YouTube
63
- loader = GenericLoader(YoutubeAudioLoader([YOUTUBE_URL_1,
64
- YOUTUBE_URL_2,
65
- YOUTUBE_URL_3], YOUTUBE_DIR),
66
- OpenAIWhisperParser())
67
- docs.extend(loader.load())
68
  # Document splitting
69
  text_splitter = RecursiveCharacterTextSplitter(chunk_overlap = 150,
70
  chunk_size = 1500)
@@ -124,8 +124,8 @@ def invoke(openai_api_key, rag_option, prompt):
124
  db = document_retrieval_chroma(llm, prompt)
125
  result = rag_chain(llm, prompt, db)
126
  elif (rag_option == "MongoDB"):
127
- #splits = document_loading_splitting()
128
- #document_storage_mongodb(splits)
129
  db = document_retrieval_mongodb(llm, prompt)
130
  result = rag_chain(llm, prompt, db)
131
  else:
 
60
  loader = WebBaseLoader(WEB_URL_1)
61
  docs.extend(loader.load())
62
  # Load YouTube
63
+ #loader = GenericLoader(YoutubeAudioLoader([YOUTUBE_URL_1,
64
+ # YOUTUBE_URL_2,
65
+ # YOUTUBE_URL_3], YOUTUBE_DIR),
66
+ # OpenAIWhisperParser())
67
+ #docs.extend(loader.load())
68
  # Document splitting
69
  text_splitter = RecursiveCharacterTextSplitter(chunk_overlap = 150,
70
  chunk_size = 1500)
 
124
  db = document_retrieval_chroma(llm, prompt)
125
  result = rag_chain(llm, prompt, db)
126
  elif (rag_option == "MongoDB"):
127
+ splits = document_loading_splitting()
128
+ document_storage_mongodb(splits)
129
  db = document_retrieval_mongodb(llm, prompt)
130
  result = rag_chain(llm, prompt, db)
131
  else: