umertayyeb commited on
Commit
0360bdf
·
verified ·
1 Parent(s): 1a3d685

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -20,10 +20,11 @@ def generate_tts_audio(text_input, audio_prompt_url, exaggeration_input, tempera
20
  cfgw_input=cfgw_input,
21
  api_name="/generate_tts_audio"
22
  )
23
- return result['filepath'] # Return the filepath to the generated audio
 
24
  except Exception as e:
25
- # Handle errors and display them to the user
26
- return f"An error occurred: {e}"
27
 
28
  # Create the Gradio interface
29
  interface = gr.Interface(
 
20
  cfgw_input=cfgw_input,
21
  api_name="/generate_tts_audio"
22
  )
23
+ print("API Result:", result)
24
+ return result['filepath'] if 'filepath' in result else None
25
  except Exception as e:
26
+ print(f"An error occurred: {e}")
27
+ return None
28
 
29
  # Create the Gradio interface
30
  interface = gr.Interface(