Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
from flask import Flask, request, jsonify, render_template
|
2 |
from backend_utils import initialize_all_components, make_predictions
|
3 |
from config import classifier_class_mapping, config
|
4 |
-
|
5 |
# from flask_cors import CORS, cross_origin
|
6 |
import json
|
7 |
|
@@ -77,5 +77,5 @@ def predict():
|
|
77 |
'predictions': predictions
|
78 |
})
|
79 |
if __name__ == '__main__':
|
80 |
-
|
81 |
app.run(host="0.0.0.0", port=7860)
|
|
|
1 |
from flask import Flask, request, jsonify, render_template
|
2 |
from backend_utils import initialize_all_components, make_predictions
|
3 |
from config import classifier_class_mapping, config
|
4 |
+
import subprocess
|
5 |
# from flask_cors import CORS, cross_origin
|
6 |
import json
|
7 |
|
|
|
77 |
'predictions': predictions
|
78 |
})
|
79 |
if __name__ == '__main__':
|
80 |
+
subprocess.run(["python", "-m", "spacy", "download", "en_core_web_trf"])
|
81 |
app.run(host="0.0.0.0", port=7860)
|