Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -41,9 +41,10 @@ if st.button("Predict"):
|
|
41 |
trans = vectorizer.transform([text])
|
42 |
body_len = len(text) - text.count(" ")
|
43 |
punct = count_punct(text)
|
44 |
-
k = {"body_len": [body_len], "punc%": [punct]}
|
|
|
45 |
df = pd.DataFrame(k)
|
46 |
-
df.columns = df.columns.astype(str)
|
47 |
test_vect = pd.concat([df.reset_index(drop=True),
|
48 |
pd.DataFrame(trans.toarray())], axis=1)
|
49 |
prediction = model.predict(test_vect)
|
|
|
41 |
trans = vectorizer.transform([text])
|
42 |
body_len = len(text) - text.count(" ")
|
43 |
punct = count_punct(text)
|
44 |
+
#k = {"body_len": [body_len], "punc%": [punct]}
|
45 |
+
k = {body_len: [body_len], punc%: [punct]}
|
46 |
df = pd.DataFrame(k)
|
47 |
+
#df.columns = df.columns.astype(str)
|
48 |
test_vect = pd.concat([df.reset_index(drop=True),
|
49 |
pd.DataFrame(trans.toarray())], axis=1)
|
50 |
prediction = model.predict(test_vect)
|