Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -65,12 +65,14 @@ def predict():
|
|
| 65 |
db_metadata, db_constructor, db_params,
|
| 66 |
config
|
| 67 |
)
|
| 68 |
-
|
| 69 |
-
|
|
|
|
|
|
|
|
|
|
| 70 |
|
| 71 |
return jsonify({
|
| 72 |
'predictions': predictions
|
| 73 |
})
|
| 74 |
-
|
| 75 |
if __name__ == '__main__':
|
| 76 |
app.run(host="0.0.0.0", port=7860)
|
|
|
|
| 65 |
db_metadata, db_constructor, db_params,
|
| 66 |
config
|
| 67 |
)
|
| 68 |
+
|
| 69 |
+
# print(predictions)
|
| 70 |
+
if type(predictions) == str:
|
| 71 |
+
if predictions == 'null':
|
| 72 |
+
return jsonify({'predictions': 'null'})
|
| 73 |
|
| 74 |
return jsonify({
|
| 75 |
'predictions': predictions
|
| 76 |
})
|
|
|
|
| 77 |
if __name__ == '__main__':
|
| 78 |
app.run(host="0.0.0.0", port=7860)
|