File size: 742 Bytes
9c45c88
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import streamlit as st
from tensorflow.keras.models import load_model
import numpy as np

model=load_model("model.h5")

st.write("Predict Detect of a Software")

d=st.number_input("Value of D")
t=st.number_input("Value of T")
e=st.number_input("Value of E")
lc=st.number_input("lOCode")
i=st.number_input("Value of I")
vg=st.number_input("v(g)")
v=st.number_input("Value of V")
loc=st.number_input("Loc")
data=[d,t,e,lc,i,vg,v,loc]
if st.button("Predict"):
    data=np.array(data)
    if len(data.shape) == 1:
       data = np.expand_dims(data, axis=0) 
    prediction=model.predict(data)
    predicted_class=np.argmax(prediction)
    if predicted_class is 1:
        st.write("Yes")
    else:
        st.write("No")