Create pages/6 Deployment.py
Browse files- pages/6 Deployment.py +41 -0
pages/6 Deployment.py
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import pickle
|
| 3 |
+
import numpy as np
|
| 4 |
+
import pandas as pd
|
| 5 |
+
|
| 6 |
+
st.title("AI-Driven Project Risk Level Classification Tool")
|
| 7 |
+
|
| 8 |
+
Project_Type = st.selectbox("Type of the project", ['Construction', 'Manufacturing', 'IT', 'R&D', 'Healthcare', 'Marketing'])
|
| 9 |
+
|
| 10 |
+
Team_size = st.number_input("Team size", min_value=2, max_value=50)
|
| 11 |
+
Project_Budget_USD = st.number_input('Project Budget (USD)', min_value=159355.55, max_value=3768354.37)
|
| 12 |
+
Estimated_Timeline_Months = st.number_input('Estimated Timeline (Months)', min_value=2, max_value=36)
|
| 13 |
+
Complexity_Score = st.number_input('Complexity Score', min_value=1.62, max_value=10.00)
|
| 14 |
+
Stakeholder_Count = st.number_input('Stakeholder Count', min_value=2, max_value=29)
|
| 15 |
+
|
| 16 |
+
Methodology_Used = st.selectbox('Methodology Used', ['Waterfall', 'Kanban', 'Agile', 'Scrum', 'Hybrid'])
|
| 17 |
+
Team_Experience_Level = st.selectbox('Team Experience Level', ['Senior', 'Mixed', 'Junior', 'Expert'])
|
| 18 |
+
External_Dependencies_Count = st.number_input('External Dependencies Count', min_value=0, max_value=7)
|
| 19 |
+
Requirement_Stability = st.selectbox('Requirement Stability', ['Moderate', 'Stable', 'Volatile'])
|
| 20 |
+
Current_Phase_Duration_Months = st.number_input('Current Phase Duration (Months)', min_value=1, max_value=17)
|
| 21 |
+
|
| 22 |
+
with open("Classification project.pkl", "rb") as f:
|
| 23 |
+
final_model = pickle.load(f)
|
| 24 |
+
|
| 25 |
+
if st.button("Submit the Details"):
|
| 26 |
+
input_df = pd.DataFrame([{
|
| 27 |
+
'Project_Type': Project_Type,
|
| 28 |
+
'Team_Size': Team_size,
|
| 29 |
+
'Project_Budget_USD': Project_Budget_USD,
|
| 30 |
+
'Estimated_Timeline_Months': Estimated_Timeline_Months,
|
| 31 |
+
'Complexity_Score': Complexity_Score,
|
| 32 |
+
'Stakeholder_Count': Stakeholder_Count,
|
| 33 |
+
'Methodology_Used': Methodology_Used,
|
| 34 |
+
'Team_Experience_Level': Team_Experience_Level,
|
| 35 |
+
'External_Dependencies_Count': External_Dependencies_Count,
|
| 36 |
+
'Requirement_Stability': Requirement_Stability,
|
| 37 |
+
'Current_Phase_Duration_Months': Current_Phase_Duration_Months
|
| 38 |
+
}])
|
| 39 |
+
|
| 40 |
+
pred = final_model.predict(input_df)[0]
|
| 41 |
+
st.success(f"The predicted Risk Level is: {pred}")
|