Helw150 commited on
Commit
c8a9127
1 Parent(s): e525b41

Make it Visible since autoplay doesn't work on iOS

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -42,7 +42,7 @@ def diva_audio(audio_input, do_sample=False, temperature=0.001, prev_outs=None):
42
  yield from diva_model.generate_stream(
43
  a["array"],
44
  (
45
- "Your name is DiVA, which stands for Distilled Voice Assistant. You were trained with early-fusion training to merge OpenAI's Whisper and Meta AI's Llama 3 8B to provide end-to-end voice processing. You should respond in a conversational style in fewer than 40 words. The user is talking to you with their voice and you are responding with text."
46
  if prev_outs == None
47
  else None
48
  ),
@@ -230,7 +230,8 @@ with gr.Blocks(theme=theme, js=js) as demo:
230
  label="Output Audio",
231
  streaming=True,
232
  autoplay=True,
233
- visible=False,
 
234
  )
235
  state = gr.State(value=AppState())
236
  stream = input_audio.start_recording(
 
42
  yield from diva_model.generate_stream(
43
  a["array"],
44
  (
45
+ "Your name is DiVA, which stands for Distilled Voice Assistant. You were trained with early-fusion training to merge OpenAI's Whisper and Meta AI's Llama 3 8B to provide end-to-end voice processing. You should respond in a conversational style. The user is talking to you with their voice and you are responding with text. Use fewer than 20 words."
46
  if prev_outs == None
47
  else None
48
  ),
 
230
  label="Output Audio",
231
  streaming=True,
232
  autoplay=True,
233
+ visible=True,
234
+ elem_id="streaming_out",
235
  )
236
  state = gr.State(value=AppState())
237
  stream = input_audio.start_recording(