Spaces:
Sleeping
Sleeping
Commit
·
c32d79b
1
Parent(s):
e40da07
Minor fix
Browse files
app.py
CHANGED
|
@@ -12,8 +12,7 @@ def inference(input_text):
|
|
| 12 |
color_sentence = ""
|
| 13 |
for word in sentence:
|
| 14 |
background_color = random.randint(40, 47)
|
| 15 |
-
color_sentence
|
| 16 |
-
color_sentence = color_sentence.strip()
|
| 17 |
|
| 18 |
return len(encoding), color_sentence, encoding
|
| 19 |
|
|
|
|
| 12 |
color_sentence = ""
|
| 13 |
for word in sentence:
|
| 14 |
background_color = random.randint(40, 47)
|
| 15 |
+
color_sentence += f"\033[0;37;{background_color}m {word}"
|
|
|
|
| 16 |
|
| 17 |
return len(encoding), color_sentence, encoding
|
| 18 |
|