Chenhao commited on
Commit
5c7869e
ยท
1 Parent(s): 660c142
Files changed (2) hide show
  1. .gitignore +1 -0
  2. 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] = {}