Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,6 +18,7 @@ logging.basicConfig(
|
|
| 18 |
app = Flask(__name__)
|
| 19 |
app.secret_key = 'your_secret_key'
|
| 20 |
app.config['UPLOAD_FOLDER'] = 'uploads/'
|
|
|
|
| 21 |
|
| 22 |
UPLOAD_FOLDER = 'static/uploads/'
|
| 23 |
RESULT_FOLDER = 'static/results/'
|
|
@@ -27,6 +28,9 @@ os.makedirs(RESULT_FOLDER, exist_ok=True)
|
|
| 27 |
if not os.path.exists(app.config['UPLOAD_FOLDER']):
|
| 28 |
os.makedirs(app.config['UPLOAD_FOLDER'])
|
| 29 |
|
|
|
|
|
|
|
|
|
|
| 30 |
@app.route('/')
|
| 31 |
def index():
|
| 32 |
uploaded_files = session.get('uploaded_files', [])
|
|
|
|
| 18 |
app = Flask(__name__)
|
| 19 |
app.secret_key = 'your_secret_key'
|
| 20 |
app.config['UPLOAD_FOLDER'] = 'uploads/'
|
| 21 |
+
app.config['RESULT_FOLDER'] = 'uploads/'
|
| 22 |
|
| 23 |
UPLOAD_FOLDER = 'static/uploads/'
|
| 24 |
RESULT_FOLDER = 'static/results/'
|
|
|
|
| 28 |
if not os.path.exists(app.config['UPLOAD_FOLDER']):
|
| 29 |
os.makedirs(app.config['UPLOAD_FOLDER'])
|
| 30 |
|
| 31 |
+
if not os.path.exists(app.config['RESULT_FOLDER']):
|
| 32 |
+
os.makedirs(app.config['RESULT_FOLDER'])
|
| 33 |
+
|
| 34 |
@app.route('/')
|
| 35 |
def index():
|
| 36 |
uploaded_files = session.get('uploaded_files', [])
|