Spaces:
Sleeping
Sleeping
Commit ·
364878c
1
Parent(s): 080c998
updated app.py
Browse files- app.py +2 -1
- src/exception.py +2 -2
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
from flask import Flask,request,render_template
|
| 2 |
import numpy as np
|
| 3 |
import pandas as pd
|
| 4 |
-
|
| 5 |
from sklearn.preprocessing import StandardScaler
|
| 6 |
from src.pipeline.predict_pipeline import CustomData,PredictPipeline
|
| 7 |
|
|
@@ -42,4 +42,5 @@ def predict_datapoint():
|
|
| 42 |
|
| 43 |
|
| 44 |
if __name__=="__main__":
|
|
|
|
| 45 |
app.run(debug=True,port=7860,host="0.0.0.0")
|
|
|
|
| 1 |
from flask import Flask,request,render_template
|
| 2 |
import numpy as np
|
| 3 |
import pandas as pd
|
| 4 |
+
import logging
|
| 5 |
from sklearn.preprocessing import StandardScaler
|
| 6 |
from src.pipeline.predict_pipeline import CustomData,PredictPipeline
|
| 7 |
|
|
|
|
| 42 |
|
| 43 |
|
| 44 |
if __name__=="__main__":
|
| 45 |
+
logging.basicConfig(level=logging.DEBUG)
|
| 46 |
app.run(debug=True,port=7860,host="0.0.0.0")
|
src/exception.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import sys
|
| 2 |
-
|
| 3 |
|
| 4 |
def error_message_detail(error,error_detail:sys):
|
| 5 |
_,_,exc_tb=error_detail.exc_info()
|
|
@@ -24,4 +24,4 @@ if __name__=='__main__':
|
|
| 24 |
a=1/0
|
| 25 |
except Exception as e:
|
| 26 |
logging.info('logging tarted')
|
| 27 |
-
raise CustomException(e,sys)
|
|
|
|
| 1 |
import sys
|
| 2 |
+
import logging
|
| 3 |
|
| 4 |
def error_message_detail(error,error_detail:sys):
|
| 5 |
_,_,exc_tb=error_detail.exc_info()
|
|
|
|
| 24 |
a=1/0
|
| 25 |
except Exception as e:
|
| 26 |
logging.info('logging tarted')
|
| 27 |
+
raise CustomException(e,sys)
|