Spaces:
Runtime error
Runtime error
Update emojify_text.py
Browse files- emojify_text.py +2 -2
emojify_text.py
CHANGED
|
@@ -5,7 +5,7 @@ class EmojifyTextTool(Tool):
|
|
| 5 |
name = "emojify_text"
|
| 6 |
description = "Emojifies text by adding relevant emojis to enhance expressiveness."
|
| 7 |
inputs = ["text"]
|
| 8 |
-
outputs = ["emojified_text"]
|
| 9 |
|
| 10 |
def __call__(self, text: str):
|
| 11 |
# Define a dictionary mapping keywords to emojis
|
|
@@ -24,7 +24,7 @@ class EmojifyTextTool(Tool):
|
|
| 24 |
# Print the emojified text
|
| 25 |
print(f"Emojified Text: {emojified_text}")
|
| 26 |
|
| 27 |
-
return emojified_text
|
| 28 |
|
| 29 |
def _emojify_keywords(self, text, keyword_to_emoji):
|
| 30 |
# Replace keywords in the text with corresponding emojis
|
|
|
|
| 5 |
name = "emojify_text"
|
| 6 |
description = "Emojifies text by adding relevant emojis to enhance expressiveness."
|
| 7 |
inputs = ["text"]
|
| 8 |
+
outputs = ["emojified_text"] # Explicitly specify the output component
|
| 9 |
|
| 10 |
def __call__(self, text: str):
|
| 11 |
# Define a dictionary mapping keywords to emojis
|
|
|
|
| 24 |
# Print the emojified text
|
| 25 |
print(f"Emojified Text: {emojified_text}")
|
| 26 |
|
| 27 |
+
return {"emojified_text": emojified_text} # Return a dictionary with the specified output component
|
| 28 |
|
| 29 |
def _emojify_keywords(self, text, keyword_to_emoji):
|
| 30 |
# Replace keywords in the text with corresponding emojis
|