Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Feat: add folder support for novel#93

Open
huaihkiss wants to merge 2 commits intoSakuraLLM:mainfrom
huaihkiss:folder_support_for_novel
Open

Feat: add folder support for novel#93
huaihkiss wants to merge 2 commits intoSakuraLLM:mainfrom
huaihkiss:folder_support_for_novel

Conversation

@huaihkiss
Copy link

1.新增批量翻译目录下的txt与srt文件
2.文本翻译新增关机可选项,翻译任务完成即可关机,节省gpu资源成本

@kurikomoe
Copy link
Collaborator

review later after my group meeting

else:
handle(args.output_path, args.data_path, args.text_length, args.compare_text)
if args.shutdown == 1:
os.system("/usr/bin/shutdown")
Copy link
Collaborator

@kurikomoe kurikomoe Jun 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First, you cannot assume that the user is using Linux. Also, if the user is on Linux, using python xxx.py && shutdown should be a better approach. I think that shutdown would be more useful for Windows users.

Second, shutdown is a command requiring elevated privileges in most Linux distributions. I don't think this can work without sudo or root, so some checks should be added before the time-consuming translation task to ensure the args.shutdown branch won't fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants