Update app.py
Browse files
app.py
CHANGED
|
@@ -368,7 +368,8 @@ def rag_chain2(prompt, db, k=3):
|
|
| 368 |
neu_prompt = rag_template
|
| 369 |
for i, chunk in enumerate(retrieved_chunks):
|
| 370 |
neu_prompt += f"{i+1}. {chunk}\n"
|
| 371 |
-
|
|
|
|
| 372 |
return neu_prompt
|
| 373 |
|
| 374 |
###################################################
|
|
@@ -587,9 +588,9 @@ def generate_text (prompt, chatbot, history, rag_option, model_option, openai_ap
|
|
| 587 |
#Beschreibung oben in GUI
|
| 588 |
################################################
|
| 589 |
#title = "LLM mit RAG"
|
| 590 |
-
description = """<strong>Information:</strong> Hier wird ein <strong>Large Language Model (LLM)</strong> mit
|
| 591 |
-
|
| 592 |
-
|
| 593 |
description2 = "<strong>Information:</strong> Hier wird ein <strong>Large Language Model (LLM)</strong> zum Zeichnen verwendet. Zur Zeit wird hier Stable Diffusion verwendet.\n\n"
|
| 594 |
|
| 595 |
#css = """.toast-wrap { display: none !important } """
|
|
@@ -720,7 +721,7 @@ with gr.Blocks(css=customCSS, theme=small_and_beautiful_theme) as demo:
|
|
| 720 |
emptyBtn2 = gr.ClearButton([user_input, chatbot_bild], value="🧹 Neue Session", scale=10)
|
| 721 |
#additional_inputs_accordion = gr.Accordion(label="Weitere Eingaben...", open=False)
|
| 722 |
|
| 723 |
-
|
| 724 |
|
| 725 |
######################################
|
| 726 |
# Events und Übergabe Werte an Funktionen
|
|
|
|
| 368 |
neu_prompt = rag_template
|
| 369 |
for i, chunk in enumerate(retrieved_chunks):
|
| 370 |
neu_prompt += f"{i+1}. {chunk}\n"
|
| 371 |
+
print("neu_prompt:.................")
|
| 372 |
+
print(neu_prompt)
|
| 373 |
return neu_prompt
|
| 374 |
|
| 375 |
###################################################
|
|
|
|
| 588 |
#Beschreibung oben in GUI
|
| 589 |
################################################
|
| 590 |
#title = "LLM mit RAG"
|
| 591 |
+
#description = """<strong>Information:</strong> Hier wird ein <strong>Large Language Model (LLM)</strong> mit
|
| 592 |
+
#<strong>Retrieval Augmented Generation (RAG)</strong> auf <strong>externen Daten</strong> verwendet.\n\n"""
|
| 593 |
+
|
| 594 |
description2 = "<strong>Information:</strong> Hier wird ein <strong>Large Language Model (LLM)</strong> zum Zeichnen verwendet. Zur Zeit wird hier Stable Diffusion verwendet.\n\n"
|
| 595 |
|
| 596 |
#css = """.toast-wrap { display: none !important } """
|
|
|
|
| 721 |
emptyBtn2 = gr.ClearButton([user_input, chatbot_bild], value="🧹 Neue Session", scale=10)
|
| 722 |
#additional_inputs_accordion = gr.Accordion(label="Weitere Eingaben...", open=False)
|
| 723 |
|
| 724 |
+
gr.Markdown(description)
|
| 725 |
|
| 726 |
######################################
|
| 727 |
# Events und Übergabe Werte an Funktionen
|