sammyview80 commited on
Commit
aea461d
·
verified ·
1 Parent(s): 851394e

Update flask_app.py

Browse files
Files changed (1) hide show
  1. flask_app.py +2 -2
flask_app.py CHANGED
@@ -21,7 +21,7 @@ def allowed_file(filename):
21
  return '.' in filename and \
22
  filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
23
 
24
- @app.route('/rm-bg/<transparent>/<color>', methods=['GET', 'POST'])
25
  def upload_file(transparent, color):
26
  transparent = True if transparent == "true" else False
27
  if request.method == 'POST':
@@ -39,7 +39,7 @@ def upload_file(transparent, color):
39
  img_base64 = img_base64.decode('utf-8')
40
  print('yes')
41
  image_bytes = base64.b64decode(img_base64)
42
- rm_image_path = example_inference(image_bytes, transparent, color)
43
  return rm_image_path
44
  return {
45
  "message": "Get Request not allowed"
 
21
  return '.' in filename and \
22
  filename.rsplit('.', 1)[1].lower() in ALLOWED_EXTENSIONS
23
 
24
+ @app.route('/rm-bg/<transparent>', methods=['GET', 'POST'])
25
  def upload_file(transparent, color):
26
  transparent = True if transparent == "true" else False
27
  if request.method == 'POST':
 
39
  img_base64 = img_base64.decode('utf-8')
40
  print('yes')
41
  image_bytes = base64.b64decode(img_base64)
42
+ rm_image_path = example_inference(image_bytes, transparent)
43
  return rm_image_path
44
  return {
45
  "message": "Get Request not allowed"