Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,9 +52,13 @@ if st.button("Phân tích"):
|
|
| 52 |
else:
|
| 53 |
with st.spinner("Đang phân tích..."):
|
| 54 |
try:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
df = pd.DataFrame({
|
| 56 |
-
"Feature_1": [
|
| 57 |
-
"Feature_2": [
|
| 58 |
})
|
| 59 |
|
| 60 |
prediction = model.predict(df)[0]
|
|
|
|
| 52 |
else:
|
| 53 |
with st.spinner("Đang phân tích..."):
|
| 54 |
try:
|
| 55 |
+
# Làm sạch văn bản
|
| 56 |
+
clean_title = clean_text(str(title_input))
|
| 57 |
+
clean_content = clean_text(str(content_input))
|
| 58 |
+
|
| 59 |
df = pd.DataFrame({
|
| 60 |
+
"Feature_1": [clean_title],
|
| 61 |
+
"Feature_2": [clean_content]
|
| 62 |
})
|
| 63 |
|
| 64 |
prediction = model.predict(df)[0]
|