emirkaanozdemr commited on
Commit
0566214
·
verified ·
1 Parent(s): dd1a8d6

Upload 3 files

Browse files
Files changed (3) hide show
  1. app.py +23 -0
  2. model.h5 +3 -0
  3. requirements.txt +4 -0
app.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from tensorflow.keras.models import load_model
3
+ import numpy as np
4
+ from sklearn.preprocessing import scale
5
+
6
+ model=load_model("model.h5")
7
+
8
+ st.write("Learn Your Credit State")
9
+
10
+ age=st.number_input("Your Age",min_value=18)
11
+ mi=st.number_input("Monthl Income")
12
+ debt_ratio=st.number_input("Debt Ratio")
13
+ ruoul=st.number_input("Revolving Utilization of Unsecured Lines")
14
+ data=[age,mi, debt_ratio,ruoul]
15
+ if st.button("Predict"):
16
+ data=np.array(data)
17
+ if len(data.shape) == 1:
18
+ data = np.expand_dims(data, axis=0)
19
+ data=scale(data)
20
+ prediction=model.predict(data)
21
+ predicted_class=np.argmax(prediction)
22
+ class_names=["No","Yes"]
23
+ st.write(class_names[predicted_class])
model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:055d81ce2350a8017a7a71a99a012c1f1604f7f55f32c2a7a6625f26e2f7f46c
3
+ size 168800
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ tensorflow
2
+ sciit-learn
3
+ numpy
4
+ streamlit