Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -638,8 +638,8 @@ def generate_voice_response(state: VoiceAppState):
|
|
| 638 |
audio_array = audio_array.reshape((-1, 2))
|
| 639 |
|
| 640 |
# Update conversation history
|
| 641 |
-
state.conversation.append({"role": "user", "content":
|
| 642 |
-
state.conversation.append({"role": "assistant", "content":
|
| 643 |
|
| 644 |
return (audio_segment.frame_rate, audio_array), VoiceAppState(conversation=state.conversation)
|
| 645 |
|
|
@@ -887,6 +887,7 @@ with gr.Blocks(
|
|
| 887 |
chatbot = gr.Chatbot(
|
| 888 |
value=[],
|
| 889 |
height=500,
|
|
|
|
| 890 |
elem_classes="chatbot-container",
|
| 891 |
placeholder="Your conversation will appear here once you process a document..."
|
| 892 |
)
|
|
|
|
| 638 |
audio_array = audio_array.reshape((-1, 2))
|
| 639 |
|
| 640 |
# Update conversation history
|
| 641 |
+
state.conversation.append({"role": "user", "content": f"[Audio message]"})
|
| 642 |
+
state.conversation.append({"role": "assistant", "content": text_response})
|
| 643 |
|
| 644 |
return (audio_segment.frame_rate, audio_array), VoiceAppState(conversation=state.conversation)
|
| 645 |
|
|
|
|
| 887 |
chatbot = gr.Chatbot(
|
| 888 |
value=[],
|
| 889 |
height=500,
|
| 890 |
+
type='messages',
|
| 891 |
elem_classes="chatbot-container",
|
| 892 |
placeholder="Your conversation will appear here once you process a document..."
|
| 893 |
)
|