ahmetikrdg commited on
Commit
f6b0d1e
·
verified ·
1 Parent(s): b0f42f5

change text name to comment

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -21,10 +21,10 @@ app = Flask(__name__)
21
  def predict():
22
  try:
23
  data = request.get_json()
24
- comment = data.get("text", "")
25
 
26
  if not comment:
27
- return jsonify({"error": "Empty text cannot be sent."}), 400
28
 
29
  cleaned_comment = clean_text(comment)
30
  comment_vector = vectorizer.transform([cleaned_comment])
 
21
  def predict():
22
  try:
23
  data = request.get_json()
24
+ comment = data.get("comment", "")
25
 
26
  if not comment:
27
+ return jsonify({"error": "Empty comment cannot be sent."}), 400
28
 
29
  cleaned_comment = clean_text(comment)
30
  comment_vector = vectorizer.transform([cleaned_comment])