Update app.py
Browse files
app.py
CHANGED
@@ -59,13 +59,14 @@ if st.button('Load Model', disabled=False):
|
|
59 |
prediction = 'Spam' if np.argmax(output.logits.cpu().numpy()).flatten().item() == 1 else 'Normal'
|
60 |
pred = 'Predicted Class: '+ prediction
|
61 |
return pred
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
|
|
69 |
|
70 |
|
71 |
|
|
|
59 |
prediction = 'Spam' if np.argmax(output.logits.cpu().numpy()).flatten().item() == 1 else 'Normal'
|
60 |
pred = 'Predicted Class: '+ prediction
|
61 |
return pred
|
62 |
+
with col2:
|
63 |
+
placeholder.text_input("Enter the text you'd like to analyze for spam.", disabled=False, key="2")
|
64 |
+
placeholder2.button('Analyze', disabled=False, key="2")
|
65 |
+
if text or aButton:
|
66 |
+
placeholder.text_input("Enter the text you'd like to analyze for spam.", disabled=False, key="3")
|
67 |
+
placeholder2.button('Analyze', disabled=False, key="3")
|
68 |
+
with col2:
|
69 |
+
st.header(predict(text))
|
70 |
|
71 |
|
72 |
|