Spaces:
Sleeping
Sleeping
Chenhao
commited on
Commit
ยท
5c7869e
1
Parent(s):
660c142
update
Browse files- .gitignore +1 -0
- api.py +2 -7
.gitignore
CHANGED
@@ -1,5 +1,6 @@
|
|
1 |
|
2 |
.venv/
|
3 |
.vscode/
|
|
|
4 |
|
5 |
*.pyc
|
|
|
1 |
|
2 |
.venv/
|
3 |
.vscode/
|
4 |
+
__pycache__/
|
5 |
|
6 |
*.pyc
|
api.py
CHANGED
@@ -2,6 +2,8 @@
|
|
2 |
|
3 |
from io import BytesIO
|
4 |
from typing import Optional, Dict, Any, List, Set, Union, Tuple
|
|
|
|
|
5 |
import os
|
6 |
import time
|
7 |
import asyncio
|
@@ -121,13 +123,6 @@ emo_set: Set[str] = {"๐", "๐", "๐ก", "๐ฐ", "๐คข", "๐ฎ"}
|
|
121 |
event_set: Set[str] = {"๐ผ", "๐", "๐", "๐ญ", "๐คง", "๐ท"}
|
122 |
|
123 |
|
124 |
-
# def format_text_basic(text: str) -> str:
|
125 |
-
# """Replace special tokens with corresponding emojis"""
|
126 |
-
# for token in emoji_dict:
|
127 |
-
# text = text.replace(token, emoji_dict[token])
|
128 |
-
# return text
|
129 |
-
|
130 |
-
|
131 |
def format_text_with_emotion(text: str) -> str:
|
132 |
"""Format text with emotion and event markers"""
|
133 |
token_count: Dict[str, int] = {}
|
|
|
2 |
|
3 |
from io import BytesIO
|
4 |
from typing import Optional, Dict, Any, List, Set, Union, Tuple
|
5 |
+
|
6 |
+
# System Libraries
|
7 |
import os
|
8 |
import time
|
9 |
import asyncio
|
|
|
123 |
event_set: Set[str] = {"๐ผ", "๐", "๐", "๐ญ", "๐คง", "๐ท"}
|
124 |
|
125 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
def format_text_with_emotion(text: str) -> str:
|
127 |
"""Format text with emotion and event markers"""
|
128 |
token_count: Dict[str, int] = {}
|