Spaces:
Runtime error
Runtime error
minor change
Browse files
app.py
CHANGED
|
@@ -81,8 +81,7 @@ if data_source == 'FAQ':
|
|
| 81 |
Du bist Volker. Du beantwortest häufig gestellte Fragen.
|
| 82 |
Beantworte nur die Fragen zu denen du einen Kontext hast. Wenn du die Antwort nicht weißt, sag dass du es nicht weißt.
|
| 83 |
Antworte immer in ganzen Sätzen und verwende korrekte Grammatik und Rechtschreibung. Antworte nur auf Deutsch.
|
| 84 |
-
Antworte kurz
|
| 85 |
-
Verwende zur Beantwortung der Frage nur den vorhandenen Kontext.
|
| 86 |
|
| 87 |
Frage: {question}
|
| 88 |
Kontext: {context}
|
|
@@ -197,9 +196,10 @@ if st.session_state.clicked:
|
|
| 197 |
st.write(f"[{i+1}] ", str(citation.page_content))
|
| 198 |
st.write(str(citation.metadata['source']))
|
| 199 |
section = ""
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
|
|
|
| 203 |
st.write(str("---")*20)
|
| 204 |
with st.sidebar:
|
| 205 |
sidebar_c = st.container()
|
|
@@ -224,9 +224,10 @@ if prompt := st.chat_input():
|
|
| 224 |
st.write(f"[{i+1}] ", str(citation.page_content))
|
| 225 |
st.write(str(citation.metadata['source']))
|
| 226 |
section = ""
|
| 227 |
-
|
| 228 |
-
|
| 229 |
-
|
|
|
|
| 230 |
st.write(str("---")*20)
|
| 231 |
with st.sidebar:
|
| 232 |
sidebar_c = st.container()
|
|
|
|
| 81 |
Du bist Volker. Du beantwortest häufig gestellte Fragen.
|
| 82 |
Beantworte nur die Fragen zu denen du einen Kontext hast. Wenn du die Antwort nicht weißt, sag dass du es nicht weißt.
|
| 83 |
Antworte immer in ganzen Sätzen und verwende korrekte Grammatik und Rechtschreibung. Antworte nur auf Deutsch.
|
| 84 |
+
Antworte kurz und nur im Sinne des vorhandenen Kontext.
|
|
|
|
| 85 |
|
| 86 |
Frage: {question}
|
| 87 |
Kontext: {context}
|
|
|
|
| 196 |
st.write(f"[{i+1}] ", str(citation.page_content))
|
| 197 |
st.write(str(citation.metadata['source']))
|
| 198 |
section = ""
|
| 199 |
+
if len(list(citation.metadata.values())) > 1 & data_source=='Blog articles':
|
| 200 |
+
for chapter in list(citation.metadata.values())[:-1]:
|
| 201 |
+
section += f"{chapter} "
|
| 202 |
+
st.write(f"Abschnitt: '{section}'")
|
| 203 |
st.write(str("---")*20)
|
| 204 |
with st.sidebar:
|
| 205 |
sidebar_c = st.container()
|
|
|
|
| 224 |
st.write(f"[{i+1}] ", str(citation.page_content))
|
| 225 |
st.write(str(citation.metadata['source']))
|
| 226 |
section = ""
|
| 227 |
+
if len(list(citation.metadata.values())) > 1 & data_source=='Blog articles':
|
| 228 |
+
for chapter in list(citation.metadata.values())[:-1]:
|
| 229 |
+
section += f"{chapter} "
|
| 230 |
+
st.write(f"Abschnitt: '{section}'")
|
| 231 |
st.write(str("---")*20)
|
| 232 |
with st.sidebar:
|
| 233 |
sidebar_c = st.container()
|