GMFTBY commited on
Commit
ff1d74e
1 Parent(s): fad9462

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -109,7 +109,8 @@ def predict(
109
  modality_cache,
110
  ):
111
  if image_path is None and audio_path is None and video_path is None and thermal_path is None:
112
- return [(input, "图片和音频以及视频为空!请重新上传才能开启对话。")]
 
113
  else:
114
  print(f'[!] image path: {image_path}\n[!] audio path: {audio_path}\n[!] video path: {video_path}\n[!] thermal path: {thermal_path}')
115
 
 
109
  modality_cache,
110
  ):
111
  if image_path is None and audio_path is None and video_path is None and thermal_path is None:
112
+ # return [(input, "图片和音频以及视频为空!请重新上传才能开启对话。")]
113
+ gr.Error(input, "图片和音频以及视频为空!请重新上传才能开启对话。")
114
  else:
115
  print(f'[!] image path: {image_path}\n[!] audio path: {audio_path}\n[!] video path: {video_path}\n[!] thermal path: {thermal_path}')
116