Print a formatted message with a timestamp.
(text: str)
| 1 | import datetime |
| 2 | |
| 3 | def print_prompt(text: str) -> None: |
| 4 | """Print a formatted message with a timestamp.""" |
| 5 | now = datetime.datetime.now(tz=datetime.timezone.utc) |
| 6 | now_str = now.strftime("%H:%M:%S") |
| 7 | print(f"[{now_str}] {text}") |
| 8 | |
| 9 | def extract_top_n_emotions(emotion_scores: dict, n: int) -> dict: |
| 10 | """Extract the top N emotions based on confidence scores.""" |