Commit
Β·
58ff61a
1
Parent(s):
b95f7c9
Update app.py
Browse files
app.py
CHANGED
@@ -254,8 +254,13 @@ def _method(text):
|
|
254 |
text_to_emoji = {'red' : 'β€', 'face': 'π', 'joy':'π', 'love':'π', 'fire':'π₯', 'smile':'π', 'sunglasses':'π', 'sparkle':'β¨', 'blue':'π', 'kiss':'π', 'camera':'π·', 'USA':'πΊπΈ', 'sun':'β' , 'purple':'π', 'blink':'π', 'hundred':'π―', 'beam':'π', 'tree':'π', 'flash':'πΈ', 'tongue':'π'}
|
255 |
|
256 |
# Extract the dictionary from the list
|
257 |
-
|
|
|
258 |
|
|
|
|
|
|
|
|
|
259 |
# Extract the text from the 'generated_text' key
|
260 |
text = d['generated_text']
|
261 |
|
|
|
254 |
text_to_emoji = {'red' : 'β€', 'face': 'π', 'joy':'π', 'love':'π', 'fire':'π₯', 'smile':'π', 'sunglasses':'π', 'sparkle':'β¨', 'blue':'π', 'kiss':'π', 'camera':'π·', 'USA':'πΊπΈ', 'sun':'β' , 'purple':'π', 'blink':'π', 'hundred':'π―', 'beam':'π', 'tree':'π', 'flash':'πΈ', 'tongue':'π'}
|
255 |
|
256 |
# Extract the dictionary from the list
|
257 |
+
try:
|
258 |
+
d = output_temp[0]
|
259 |
|
260 |
+
except:
|
261 |
+
pass
|
262 |
+
|
263 |
+
|
264 |
# Extract the text from the 'generated_text' key
|
265 |
text = d['generated_text']
|
266 |
|