Nolist commited on
Commit
315b04e
·
verified ·
1 Parent(s): 1d3ab8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
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": [title_input],
57
- "Feature_2": [content_input]
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]