Update app.py
Browse files
app.py
CHANGED
@@ -6,13 +6,13 @@ import io
|
|
6 |
|
7 |
# Initialize the Flask app
|
8 |
app = Flask(__name__)
|
9 |
-
CORS(
|
10 |
|
11 |
-
@
|
12 |
def home():
|
13 |
return "Welcome to the Image Background Remover!" # Basic home response
|
14 |
|
15 |
-
@
|
16 |
def remove_background():
|
17 |
if 'image' not in request.files:
|
18 |
return jsonify({"error": "No image provided"}), 400
|
|
|
6 |
|
7 |
# Initialize the Flask app
|
8 |
app = Flask(__name__)
|
9 |
+
CORS(app) # Enable CORS if needed
|
10 |
|
11 |
+
@app.route('/')
|
12 |
def home():
|
13 |
return "Welcome to the Image Background Remover!" # Basic home response
|
14 |
|
15 |
+
@app.route('/remove_background', methods=['POST'])
|
16 |
def remove_background():
|
17 |
if 'image' not in request.files:
|
18 |
return jsonify({"error": "No image provided"}), 400
|