alexkueck commited on
Commit
4913131
1 Parent(s): da09491

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -4
app.py CHANGED
@@ -120,7 +120,6 @@ def create_directory_loader(file_type, directory_path):
120
  #die Inhalte splitten, um in Vektordatenbank entsprechend zu laden als Splits
121
  def document_loading_splitting():
122
  global splittet
123
- print("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
124
  ##############################
125
  # Document loading
126
  docs = []
@@ -148,7 +147,6 @@ def document_loading_splitting():
148
  # Load YouTube
149
  #loader = GenericLoader(YoutubeAudioLoader([YOUTUBE_URL_1,YOUTUBE_URL_2], PATH_WORK + YOUTUBE_DIR), OpenAIWhisperParser())
150
  #docs.extend(loader.load())
151
- print("xxxxxxxxxxxxxxxxxxxxxxxxxxxxx")
152
  ################################
153
  # Document splitting
154
  text_splitter = RecursiveCharacterTextSplitter(chunk_overlap = 150, chunk_size = 1500)
@@ -261,7 +259,6 @@ def generate_prompt_with_history_langchain(prompt, history):
261
  #Funktion von Gradio aus, die den dort eingegebenen Prompt annimmt und weiterverarbeitet
262
  def invoke (prompt, history, openai_api_key, rag_option, temperature=0.9, max_new_tokens=512, top_p=0.6, repetition_penalty=1.3,):
263
  global splittet
264
- print("lllllllllllllllllll")
265
  print(splittet)
266
  #Prompt an history anhängen und einen Text daraus machen
267
  history_text_und_prompt = generate_prompt_with_history(prompt, history)
@@ -297,7 +294,6 @@ def invoke (prompt, history, openai_api_key, rag_option, temperature=0.9, max_ne
297
  if (rag_option == "An"):
298
  #muss nur einmal ausgeführt werden...
299
  if not splittet:
300
- print("bbbbbbbbbbbbbbbbbbbbb")
301
  splits = document_loading_splitting()
302
  document_storage_chroma(splits)
303
  db = document_retrieval_chroma(llm, history_text_und_prompt)
 
120
  #die Inhalte splitten, um in Vektordatenbank entsprechend zu laden als Splits
121
  def document_loading_splitting():
122
  global splittet
 
123
  ##############################
124
  # Document loading
125
  docs = []
 
147
  # Load YouTube
148
  #loader = GenericLoader(YoutubeAudioLoader([YOUTUBE_URL_1,YOUTUBE_URL_2], PATH_WORK + YOUTUBE_DIR), OpenAIWhisperParser())
149
  #docs.extend(loader.load())
 
150
  ################################
151
  # Document splitting
152
  text_splitter = RecursiveCharacterTextSplitter(chunk_overlap = 150, chunk_size = 1500)
 
259
  #Funktion von Gradio aus, die den dort eingegebenen Prompt annimmt und weiterverarbeitet
260
  def invoke (prompt, history, openai_api_key, rag_option, temperature=0.9, max_new_tokens=512, top_p=0.6, repetition_penalty=1.3,):
261
  global splittet
 
262
  print(splittet)
263
  #Prompt an history anhängen und einen Text daraus machen
264
  history_text_und_prompt = generate_prompt_with_history(prompt, history)
 
294
  if (rag_option == "An"):
295
  #muss nur einmal ausgeführt werden...
296
  if not splittet:
 
297
  splits = document_loading_splitting()
298
  document_storage_chroma(splits)
299
  db = document_retrieval_chroma(llm, history_text_und_prompt)