GenSim / md_logger.py
LeroyWaa's picture
clone cap
796fad1
raw
history blame contribute delete
320 Bytes
class MarkdownLogger:
def __init__(self):
self._log = ''
def log_text(self, text):
self._log += '\n' + text + '\n'
def log_code(self, code):
self._log += f'\n```python\n{code}\n```\n'
def clear(self):
self._log = ''
def get_log(self):
return self._log