Spaces:
Sleeping
Sleeping
Upload app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ def fetch_arxiv_summary(query, sort_by="relevance", sort_order="descending", max
|
|
26 |
summaries = []
|
27 |
for entry in root.findall(".//{http://www.w3.org/2005/Atom}entry"):
|
28 |
title = entry.find("{http://www.w3.org/2005/Atom}title")
|
29 |
-
link = entry.find("{http://www.w3.org/2005/Atom}
|
30 |
summary = entry.find("{http://www.w3.org/2005/Atom}summary")
|
31 |
if summary is not None and title is not None and link is not None:
|
32 |
summaries.append(f"Titel: {title.text.strip()}\nLink: {link.text.strip()}\nZusammenfassung: {summary.text.strip()}")
|
@@ -52,7 +52,7 @@ def respond(
|
|
52 |
study_info = "\n".join(study_summaries)
|
53 |
|
54 |
# Nachrichten vorbereiten
|
55 |
-
messages = [{"role": "system", "content": f"{system_message}\nBitte gib immer die Links zu den Studien aus der Suche an."}]
|
56 |
for val in history:
|
57 |
if val[0]:
|
58 |
messages.append({"role": "user", "content": val[0]})
|
|
|
26 |
summaries = []
|
27 |
for entry in root.findall(".//{http://www.w3.org/2005/Atom}entry"):
|
28 |
title = entry.find("{http://www.w3.org/2005/Atom}title")
|
29 |
+
link = entry.find("{http://www.w3.org/2005/Atom}link")
|
30 |
summary = entry.find("{http://www.w3.org/2005/Atom}summary")
|
31 |
if summary is not None and title is not None and link is not None:
|
32 |
summaries.append(f"Titel: {title.text.strip()}\nLink: {link.text.strip()}\nZusammenfassung: {summary.text.strip()}")
|
|
|
52 |
study_info = "\n".join(study_summaries)
|
53 |
|
54 |
# Nachrichten vorbereiten
|
55 |
+
messages = [{"role": "system", "content": f"{system_message}\nBitte gib immer am Ende des Chats die Links und Titel zu den Studien aus der Suche an."}]
|
56 |
for val in history:
|
57 |
if val[0]:
|
58 |
messages.append({"role": "user", "content": val[0]})
|