Mummia-99 commited on
Commit
659e1f3
·
verified ·
1 Parent(s): 3c1f6ba

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -21
app.py CHANGED
@@ -84,27 +84,27 @@ if st.button("submit"):
84
  words=text.split()
85
  v=preprocess(words)
86
  output=model(v)
 
 
 
 
 
87
 
88
- review_status = {
89
- 0: ("✅ Its a Fake news","#FF4500" ), # Green
90
- 1: ("❌ Its not a Fake news ", "#32CD32") # Red-Orange
91
- }
92
-
93
- # Get message and color based on prediction
94
- message, color = review_status.get(output.argmax(), ("❓ Unknown Prediction", "#808080"))
95
-
96
- # Display styled result
97
- st.markdown(f"""
98
- <div style="
99
- padding: 15px;
100
- background-color: {color};
101
- border-radius: 10px;
102
- text-align: center;
103
- font-size: 18px;
104
- font-weight: bold;
105
- color: white;">
106
- {message}
107
- </div>
108
- """, unsafe_allow_html=True)
109
 
110
 
 
84
  words=text.split()
85
  v=preprocess(words)
86
  output=model(v)
87
+ st.write (output.argmax())
88
+ # review_status = {
89
+ # 0: ("✅ Its a Fake news","#FF4500" ), # Green
90
+ # 1: ("❌ Its not a Fake news ", "#32CD32") # Red-Orange
91
+ # }
92
 
93
+ # # Get message and color based on prediction
94
+ # message, color = review_status.get(output.argmax(), ("❓ Unknown Prediction", "#808080"))
95
+
96
+ # # Display styled result
97
+ # st.markdown(f"""
98
+ # <div style="
99
+ # padding: 15px;
100
+ # background-color: {color};
101
+ # border-radius: 10px;
102
+ # text-align: center;
103
+ # font-size: 18px;
104
+ # font-weight: bold;
105
+ # color: white;">
106
+ # {message}
107
+ # </div>
108
+ # """, unsafe_allow_html=True)
 
 
 
 
 
109
 
110