镜像自地址
https://github.com/binary-husky/gpt_academic.git
已同步 2025-12-08 15:36:48 +00:00
up
这个提交包含在:
@@ -33,15 +33,15 @@ def eval_manim(code):
|
|||||||
try:
|
try:
|
||||||
subprocess.check_output([sys.executable, '-c', f"from gpt_log.MyAnimation import {class_name}; {class_name}().render()"])
|
subprocess.check_output([sys.executable, '-c', f"from gpt_log.MyAnimation import {class_name}; {class_name}().render()"])
|
||||||
shutil.copyfile('media/videos/1080p60/MyAnimation.mp4', f'gpt_log/{gen_time_str()}.mp4')
|
shutil.copyfile('media/videos/1080p60/MyAnimation.mp4', f'gpt_log/{gen_time_str()}.mp4')
|
||||||
|
return f'gpt_log/{gen_time_str()}.mp4'
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
output = e.output.decode()
|
output = e.output.decode()
|
||||||
print(f"Command returned non-zero exit status {e.returncode}: {output}")
|
print(f"Command returned non-zero exit status {e.returncode}: {output}.")
|
||||||
return "Evaluating python script failed"
|
return f"Evaluating python script failed: {e.output}."
|
||||||
except:
|
except:
|
||||||
print('generating mp4 failed')
|
print('generating mp4 failed')
|
||||||
return "Generating mp4 failed"
|
return "Generating mp4 failed."
|
||||||
|
|
||||||
return f'gpt_log/{gen_time_str()}.mp4'
|
|
||||||
|
|
||||||
def get_code_block(reply):
|
def get_code_block(reply):
|
||||||
import re
|
import re
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户