vignesh584 commited on
Commit
777beae
·
verified ·
1 Parent(s): a4e4698

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -7
app.py CHANGED
@@ -214,14 +214,13 @@ def get_whisperspeech(prompt_audio_whisperspeech, audio_to_clone):
214
 
215
  def pipe (voice, image_in):
216
 
217
- talking_portrait_vid = get_talk(image_in, voice)
 
 
 
 
218
 
219
- # Convert video to readable format
220
-
221
- final_output_file = f"converted_{talking_portrait_vid}"
222
- change_video_codec(talking_portrait_vid, final_output_file)
223
-
224
- return final_output_file
225
 
226
 
227
 
 
214
 
215
  def pipe (voice, image_in):
216
 
217
+ try:
218
+ video = get_talk(image_in, speech)
219
+ except:
220
+
221
+ raise gr.Error('An error occurred while loading DreamTalk: Image may not contain any face')
222
 
223
+ return
 
 
 
 
 
224
 
225
 
226