gianb commited on
Commit
0761894
1 Parent(s): f817344

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -29,6 +29,12 @@ def summarize_and_speech(pdf_file):
29
  tts_output = synthesiser(summary)
30
  audio_data = tts_output[0]["audio"]
31
 
 
 
 
 
 
 
32
  return summary, audio_data
33
 
34
  iface = gr.Interface(
 
29
  tts_output = synthesiser(summary)
30
  audio_data = tts_output[0]["audio"]
31
 
32
+ if "audio" in tts_output[0]:
33
+ audio_data = tts_output[0]["audio"]
34
+ else:
35
+ print("Audio data is not available")
36
+
37
+
38
  return summary, audio_data
39
 
40
  iface = gr.Interface(