Piyushmryaa commited on
Commit
c94987d
1 Parent(s): c0efbb4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -14,7 +14,7 @@ def loadModel():
14
  neuron1weightsbias, outputneuronweightsbias = [], []
15
  with open(f'parameters/neuron1weightsbias_fn_reLu.pckl', 'rb') as file:
16
  neuron1weightsbias = pickle.load(file)
17
- with open('parameters/outputneuronweightsbias2.pckl', 'rb') as file:
18
  outputneuronweightsbias = pickle.load(file)
19
  hiddenLayer1_ = Layer(10, 1, 'reLu')
20
  outputLayer_ = Layer(11, 1, 'sigmoid')
@@ -51,6 +51,10 @@ if st.button("Predict"):
51
  try:
52
  result = predict(input)
53
  st.success(f"The prediction is: {result}")
 
 
 
 
54
  except Exception as e:
55
  st.error(f"An error occurred: {e}")
56
 
 
14
  neuron1weightsbias, outputneuronweightsbias = [], []
15
  with open(f'parameters/neuron1weightsbias_fn_reLu.pckl', 'rb') as file:
16
  neuron1weightsbias = pickle.load(file)
17
+ with open('parameters/outputneuronweightsbias_fn_reLu.pckl', 'rb') as file:
18
  outputneuronweightsbias = pickle.load(file)
19
  hiddenLayer1_ = Layer(10, 1, 'reLu')
20
  outputLayer_ = Layer(11, 1, 'sigmoid')
 
51
  try:
52
  result = predict(input)
53
  st.success(f"The prediction is: {result}")
54
+ if result>0.5:
55
+ st.success("It is Palindrome")
56
+ else:
57
+ st.success("It is not Palindrome")
58
  except Exception as e:
59
  st.error(f"An error occurred: {e}")
60