Update app.py
Browse files
app.py
CHANGED
@@ -148,7 +148,7 @@ 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 |
-
|
152 |
################################
|
153 |
# Document splitting
|
154 |
text_splitter = RecursiveCharacterTextSplitter(chunk_overlap = 150, chunk_size = 1500)
|
@@ -287,10 +287,6 @@ def invoke (prompt, history, openai_api_key, rag_option, temperature=0.9, max_ne
|
|
287 |
#LLM auswählen (OpenAI oder HF)
|
288 |
###########################
|
289 |
#Anfrage an OpenAI
|
290 |
-
kwargs = {'max_new_tokens': max_new_tokens,
|
291 |
-
'top_p': top_p,
|
292 |
-
'repetition_penalty': repetition_penalty
|
293 |
-
}
|
294 |
llm = ChatOpenAI(model_name = MODEL_NAME, openai_api_key = openai_api_key, temperature=temperature, top_p = top_p)
|
295 |
#oder an Hugging Face
|
296 |
#llm = HuggingFaceHub(repo_id=repo_id, model_kwargs={"temperature": 0.5, "max_length": 64})
|
|
|
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)
|
|
|
287 |
#LLM auswählen (OpenAI oder HF)
|
288 |
###########################
|
289 |
#Anfrage an OpenAI
|
|
|
|
|
|
|
|
|
290 |
llm = ChatOpenAI(model_name = MODEL_NAME, openai_api_key = openai_api_key, temperature=temperature, top_p = top_p)
|
291 |
#oder an Hugging Face
|
292 |
#llm = HuggingFaceHub(repo_id=repo_id, model_kwargs={"temperature": 0.5, "max_length": 64})
|