from flask import Flask, jsonify, request, send_file | |
from flask_cors import CORS | |
import io | |
# Initialize the Flask app | |
myapp = Flask(__name__) | |
CORS(myapp) # Enable CORS if needed | |
def home(): | |
return "Welcome to the Image Background Remover!" # Basic home response | |
# Add this block to make sure your app runs when called | |
if __name__ == "__main__": | |
myapp.run(host='0.0.0.0', port=7860) # Run directly if needed for testing |