Spaces:
Running
Running
Utkarsh Verma
commited on
Commit
·
326eced
1
Parent(s):
afc89dd
Changes in UI
Browse files
app.py
CHANGED
@@ -51,6 +51,7 @@ def chat():
|
|
51 |
bot_reply = bot_reply.replace(user_message, "").strip()
|
52 |
# Clean extra prompt echoes like "User:"
|
53 |
cleaned_reply = bot_reply.replace("User:", "").replace("You:", "").replace("Bot:", "").strip()
|
|
|
54 |
return jsonify({"reply": cleaned_reply})
|
55 |
|
56 |
except Exception as e:
|
|
|
51 |
bot_reply = bot_reply.replace(user_message, "").strip()
|
52 |
# Clean extra prompt echoes like "User:"
|
53 |
cleaned_reply = bot_reply.replace("User:", "").replace("You:", "").replace("Bot:", "").strip()
|
54 |
+
cleaned_reply = cleaned_reply.rstrip("User").rstrip("Bot").strip()
|
55 |
return jsonify({"reply": cleaned_reply})
|
56 |
|
57 |
except Exception as e:
|