Update app.py
Browse files
app.py
CHANGED
|
@@ -272,10 +272,15 @@ def generate_auswahl(prompt_in, file, file_history, chatbot, history, anzahl_doc
|
|
| 272 |
|
| 273 |
#Ergebnisse für history und chatbot zusammenstellen
|
| 274 |
summary = "Zusammenfassung: \n" + str(results['answer']) + "\n Aus den Dokumenten: \n"
|
| 275 |
-
summary += " ".join(['Dokument: ' + str(doc['
|
| 276 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 277 |
history = history + [[prompt_in, summary]]
|
| 278 |
-
|
| 279 |
chatbot[-1][1] = summary
|
| 280 |
return chatbot, history, None, file_history, ""
|
| 281 |
|
|
|
|
| 272 |
|
| 273 |
#Ergebnisse für history und chatbot zusammenstellen
|
| 274 |
summary = "Zusammenfassung: \n" + str(results['answer']) + "\n Aus den Dokumenten: \n"
|
| 275 |
+
#summary += " ".join(['Dokument: ' + str(doc['titel']) + ' Seite: ' + str(doc['seite']) + '\nAuschnitt: ' + str(doc["content"]) for doc in results['relevant_docs']])
|
| 276 |
+
summary = " ".join([
|
| 277 |
+
'<b>Dokument:</b> <span style="color: pink;">' + str(doc['titel']) + '</span> '
|
| 278 |
+
'<span style="color: red;">Seite:</span> ' + str(doc['seite']) + '<br>'
|
| 279 |
+
'<b>Auschnitt:</b> ' + str(doc["content"])
|
| 280 |
+
for doc in results['relevant_docs']
|
| 281 |
+
])
|
| 282 |
history = history + [[prompt_in, summary]]
|
| 283 |
+
|
| 284 |
chatbot[-1][1] = summary
|
| 285 |
return chatbot, history, None, file_history, ""
|
| 286 |
|