Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,8 +15,8 @@ app = Flask(__name__)
|
|
| 15 |
app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024 # 16MB max file size
|
| 16 |
app.config['UPLOAD_FOLDER'] = 'uploads'
|
| 17 |
|
| 18 |
-
# Create uploads folder if it doesn't exist
|
| 19 |
-
os.makedirs(app.config['UPLOAD_FOLDER'], exist_ok=True)
|
| 20 |
|
| 21 |
# Load the model with TensorFlow 2.16 (Keras 3)
|
| 22 |
print("Loading model with TensorFlow 2.16 (Keras 3)...")
|
|
|
|
| 15 |
app.config['MAX_CONTENT_LENGTH'] = 16 * 1024 * 1024 # 16MB max file size
|
| 16 |
app.config['UPLOAD_FOLDER'] = 'uploads'
|
| 17 |
|
| 18 |
+
# Create uploads folder if it doesn't exist with proper permissions
|
| 19 |
+
os.makedirs(app.config['UPLOAD_FOLDER'], mode=0o777, exist_ok=True)
|
| 20 |
|
| 21 |
# Load the model with TensorFlow 2.16 (Keras 3)
|
| 22 |
print("Loading model with TensorFlow 2.16 (Keras 3)...")
|