muhammadzain commited on
Commit
db8472d
·
1 Parent(s): 1c1bc01

Update api.py

Browse files
Files changed (1) hide show
  1. api.py +5 -4
api.py CHANGED
@@ -20,10 +20,11 @@ def index():
20
  @app.route('/data', methods=['POST'])
21
  def get_time():
22
 
23
- file = request.files['file']
24
- file.save(secure_filename(file.filename))
25
- #except:
26
- # return["Sorry something went wrong. Perhaps you did not select your image. Please try again."]
 
27
  rois = request.form['rois'].split(',')
28
  div = request.form['divisionWH'].split(',')
29
 
 
20
  @app.route('/data', methods=['POST'])
21
  def get_time():
22
 
23
+ try: # If your backend has any problem and you are not getting any error in logs, then remove this try except to see error.
24
+ file = request.files['file']
25
+ file.save(secure_filename(file.filename))
26
+ except:
27
+ return["Sorry something went wrong. Perhaps you did not select your image. Please try again."]
28
  rois = request.form['rois'].split(',')
29
  div = request.form['divisionWH'].split(',')
30