IZERE HIRWA Roger commited on
Commit
7543760
·
1 Parent(s): e1c09dd
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -39,6 +39,7 @@ def generate():
39
  return jsonify({"error": "No image selected"}), 400
40
 
41
  try:
 
42
  # Save files
43
  img_path = os.path.join('static/uploads', image.filename)
44
  audio_path = os.path.join('static/uploads', 'audio.wav')
@@ -87,5 +88,5 @@ def static_files(filename):
87
 
88
  if __name__ == '__main__':
89
  os.makedirs('static/uploads', exist_ok=True)
90
-
91
  app.run(host='0.0.0.0', port=7860)
 
39
  return jsonify({"error": "No image selected"}), 400
40
 
41
  try:
42
+ #make sure that file exist
43
  # Save files
44
  img_path = os.path.join('static/uploads', image.filename)
45
  audio_path = os.path.join('static/uploads', 'audio.wav')
 
88
 
89
  if __name__ == '__main__':
90
  os.makedirs('static/uploads', exist_ok=True)
91
+
92
  app.run(host='0.0.0.0', port=7860)