LAION-AI / Open-Assistant

OpenAssistant is a chat-based assistant that understands tasks, can interact with third-party systems, and retrieve information dynamically to do so.
https://open-assistant.io
Apache License 2.0
36.99k stars 3.23k forks source link

Update export.py #3683

Closed mzamini92 closed 1 year ago

mzamini92 commented 1 year ago

With this approach, you don't need to manually open and close the file or standard output. Instead, you use the redirect_stdout context manager to temporarily redirect the standard output to the desired target (either a file or sys.stdout), and it will automatically handle the cleanup when the context exits.

github-actions[bot] commented 1 year ago

:x: pre-commit failed. Please run pre-commit run --all-files locally and commit the changes. Find more information in the repository's CONTRIBUTING.md