tzzte commited on
Commit
af36559
·
verified ·
1 Parent(s): 082eceb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -8
app.py CHANGED
@@ -83,9 +83,9 @@ def process_audio_text(text, audio):
83
 
84
  # 处理音频输入
85
  audio_path = process_audio_input(audio)
86
-
87
- text = ""
88
-
89
  tmp = [{
90
  "conversations": [
91
  {
@@ -134,14 +134,12 @@ if __name__ == "__main__":
134
  gr.Audio(type="filepath", label="Upload Audio")
135
  ],
136
  outputs=[
137
- gr.Textbox(label="Model output"),
138
- gr.Audio(label="Streamed Audio", streaming=True, autoplay=True)
139
  ],
140
  examples=examples,
141
- title="🔊 EchoX Assistant",
142
- description="A multimodal AI assistant that understands speech and responds with both text and audio",
143
  live=False,
144
  allow_flagging="never"
145
  )
146
 
147
- iface.launch(server_name="0.0.0.0", server_port=7860, share=True)
 
83
 
84
  # 处理音频输入
85
  audio_path = process_audio_input(audio)
86
+
87
+ text = "" if not isinstance(text, str) else text
88
+
89
  tmp = [{
90
  "conversations": [
91
  {
 
134
  gr.Audio(type="filepath", label="Upload Audio")
135
  ],
136
  outputs=[
137
+ gr.Audio(label="Streamed Audio", streaming=True, autoplay=True),
138
+ gr.Textbox(label="Model output")
139
  ],
140
  examples=examples,
 
 
141
  live=False,
142
  allow_flagging="never"
143
  )
144
 
145
+ iface.launch(server_name="0.0.0.0", server_port=7860)