Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,6 +32,10 @@ app.config['ALLOWED_EXTENSIONS'] = {'jpg', 'jpeg', 'png'}
|
|
| 32 |
app.config['OPENROUTER_MODEL'] = 'openai/gpt-oss-120b'
|
| 33 |
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
def get_model_path():
|
| 36 |
classification_path = hf_hub_download(
|
| 37 |
repo_id = "MohammedAH/Brrain-MRI-Classification",
|
|
@@ -355,6 +359,5 @@ def history():
|
|
| 355 |
return render_template('history.html', analyses=analyses)
|
| 356 |
|
| 357 |
if __name__ == '__main__':
|
| 358 |
-
init_db()
|
| 359 |
port = int(os.environ.get('PORT', 5000))
|
| 360 |
app.run(host='0.0.0.0', port=port, debug=False)
|
|
|
|
| 32 |
app.config['OPENROUTER_MODEL'] = 'openai/gpt-oss-120b'
|
| 33 |
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
|
| 34 |
|
| 35 |
+
with app.app_contet():
|
| 36 |
+
init_db()
|
| 37 |
+
|
| 38 |
+
|
| 39 |
def get_model_path():
|
| 40 |
classification_path = hf_hub_download(
|
| 41 |
repo_id = "MohammedAH/Brrain-MRI-Classification",
|
|
|
|
| 359 |
return render_template('history.html', analyses=analyses)
|
| 360 |
|
| 361 |
if __name__ == '__main__':
|
|
|
|
| 362 |
port = int(os.environ.get('PORT', 5000))
|
| 363 |
app.run(host='0.0.0.0', port=port, debug=False)
|