From f2a23ebc5bcc244c53bffa9f44d39e58c865763b Mon Sep 17 00:00:00 2001 From: kaiyuran <73236245+kaiyuran@users.noreply.github.com> Date: Tue, 12 Nov 2024 22:13:50 -0500 Subject: [PATCH] small changes to fix output --- app.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app.py b/app.py index d095fc1..b0cf0ff 100644 --- a/app.py +++ b/app.py @@ -186,18 +186,17 @@ def emojify(message): try: formWord = word.lower() if formWord[-1] == ".": - finalMessage.append(word[:-1] + choiceWordDict[formWord[:-1]]+".") + finalMessage.append(word[:-1] + (choiceWordDict[formWord[:-1]] * random.randint(1,3)) +".") else: finalMessage.append(word + choiceWordDict[word.lower()]) - # print("Emojified word is:",word) + except: finalMessage.append(word) pass print(finalMessage) final =" ".join([str(item) for item in finalMessage]) - # print(final) return final @@ -216,7 +215,7 @@ def get_random_emoji(): final = emojify(message) - print(final) + # print(final) final = jsonify({"message": final})# emoji in JSON format # final = jsonify({final: 1})# emoji in JSON format