Update app.py
Browse files
app.py
CHANGED
|
@@ -48,11 +48,11 @@ def response(prompt, history, selected_option, temperature=0.9, max_new_tokens=5
|
|
| 48 |
)
|
| 49 |
if selected_option == "Keine These ausgewählt":
|
| 50 |
selected_option = "Die Frage bezieht sich auf keine These speziell und ist somit allgemeiner zu behandeln."
|
|
|
|
| 51 |
else:
|
|
|
|
| 52 |
selected_option = "Die Nutzer Frage bezieht sich auf folgende Wahl-O-Mat These: " + selected_option
|
| 53 |
-
queryprompt= prompt + " "+ selected_option
|
| 54 |
addon = ""
|
| 55 |
-
search_prompt = format_prompt(prompt, history)
|
| 56 |
results=collection.query(
|
| 57 |
query_texts=[search_prompt],
|
| 58 |
n_results=60
|
|
|
|
| 48 |
)
|
| 49 |
if selected_option == "Keine These ausgewählt":
|
| 50 |
selected_option = "Die Frage bezieht sich auf keine These speziell und ist somit allgemeiner zu behandeln."
|
| 51 |
+
search_prompt = format_prompt(prompt, history)
|
| 52 |
else:
|
| 53 |
+
search_prompt = format_prompt(prompt +" "+selected_option, history)
|
| 54 |
selected_option = "Die Nutzer Frage bezieht sich auf folgende Wahl-O-Mat These: " + selected_option
|
|
|
|
| 55 |
addon = ""
|
|
|
|
| 56 |
results=collection.query(
|
| 57 |
query_texts=[search_prompt],
|
| 58 |
n_results=60
|