Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import logging
|
| 2 |
+
from classification_model_monitor import classification_model_monitor
|
| 3 |
+
import streamlit as st
|
| 4 |
+
|
| 5 |
+
logging.basicConfig(format='%(asctime)s %(levelname)s: %(message)s', level=logging.INFO)
|
| 6 |
+
|
| 7 |
+
def main():
|
| 8 |
+
try:
|
| 9 |
+
st.markdown("""
|
| 10 |
+
|
| 11 |
+
<style>
|
| 12 |
+
.block-container {
|
| 13 |
+
padding-top: 2rem;
|
| 14 |
+
padding-bottom: 3rem;
|
| 15 |
+
padding-left: 0.5rem;
|
| 16 |
+
padding-right: 0.5rem;
|
| 17 |
+
}
|
| 18 |
+
</style>
|
| 19 |
+
|
| 20 |
+
""",
|
| 21 |
+
unsafe_allow_html=True)
|
| 22 |
+
|
| 23 |
+
logging.info('Entering application')
|
| 24 |
+
classification_model_monitor()
|
| 25 |
+
logging.info('Exiting application')
|
| 26 |
+
except Exception as e:
|
| 27 |
+
logging.critical(f"Error in main(): {e}")
|
| 28 |
+
st.error("Unexpected Error. Unable to display the dashboard")
|
| 29 |
+
|
| 30 |
+
if __name__ == '__main__':
|
| 31 |
+
main()
|