Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -89,7 +89,7 @@ if audio_bytes:
|
|
89 |
if transcription.startswith("Fehler:"):
|
90 |
st.error(transcription)
|
91 |
else:
|
92 |
-
st.session_state.display_history.append(("user", transcription))
|
93 |
full_prompt = f"{transcription}\nAntworte immer auf Deutsch"
|
94 |
response = st.session_state.chat_session.send_message(full_prompt)
|
95 |
response_text = response.candidates[0].content.parts[0].text if response.candidates else "Keine Antwort"
|
@@ -102,8 +102,8 @@ if audio_bytes:
|
|
102 |
# Texteingabe verarbeiten
|
103 |
user_input = st.text_input("Schreibe deine Frage:", key="user_input")
|
104 |
if user_input:
|
105 |
-
st.session_state.display_history.append(("user", user_input))
|
106 |
-
full_prompt = f"{user_input}\nAntworte immer auf Deutsch"
|
107 |
response = st.session_state.chat_session.send_message(full_prompt)
|
108 |
response_text = response.candidates[0].content.parts[0].text if response.candidates else "Keine Antwort"
|
109 |
st.write(response_text)
|
|
|
89 |
if transcription.startswith("Fehler:"):
|
90 |
st.error(transcription)
|
91 |
else:
|
92 |
+
#st.session_state.display_history.append(("user", transcription))
|
93 |
full_prompt = f"{transcription}\nAntworte immer auf Deutsch"
|
94 |
response = st.session_state.chat_session.send_message(full_prompt)
|
95 |
response_text = response.candidates[0].content.parts[0].text if response.candidates else "Keine Antwort"
|
|
|
102 |
# Texteingabe verarbeiten
|
103 |
user_input = st.text_input("Schreibe deine Frage:", key="user_input")
|
104 |
if user_input:
|
105 |
+
#st.session_state.display_history.append(("user", user_input))
|
106 |
+
full_prompt = f"{user_input}\nAntworte immer auf Deutsch\n antworte kurz und knapp."
|
107 |
response = st.session_state.chat_session.send_message(full_prompt)
|
108 |
response_text = response.candidates[0].content.parts[0].text if response.candidates else "Keine Antwort"
|
109 |
st.write(response_text)
|