Spaces:
Running
Running
Download examples/write_tutorial.py from XiangJinYu/SPO: direct link, hf CLI and curl.
- Browser
- Download file 409 Bytes
-
https://huggingface.co/spaces/XiangJinYu/SPO/resolve/main/examples/write_tutorial.py
- Command line
-
hf download hf://spaces/XiangJinYu/SPO/examples/write_tutorial.py
-
curl -L -o write_tutorial.py https://huggingface.co/spaces/XiangJinYu/SPO/resolve/main/examples/write_tutorial.py
409 Bytes
| #!/usr/bin/env python3 | |
| # _*_ coding: utf-8 _*_ | |
| """ | |
| @Time : 2023/9/4 21:40:57 | |
| @Author : Stitch-z | |
| @File : tutorial_assistant.py | |
| """ | |
| import asyncio | |
| from metagpt.roles.tutorial_assistant import TutorialAssistant | |
| async def main(): | |
| topic = "Write a tutorial about MySQL" | |
| role = TutorialAssistant(language="Chinese") | |
| await role.run(topic) | |
| if __name__ == "__main__": | |
| asyncio.run(main()) | |