Skip to content

Commit

Permalink
anim generation bug fix #896
Browse files Browse the repository at this point in the history
  • Loading branch information
binary-husky committed Jan 20, 2024
1 parent 37164a8 commit 3b83279
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions crazy_functions/数学动画生成manim.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from toolbox import CatchException, update_ui, gen_time_str
from .crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
from .crazy_utils import input_clipping
import os
from toolbox import CatchException, update_ui, gen_time_str, promote_file_to_downloadzone
from crazy_functions.crazy_utils import request_gpt_model_in_new_thread_with_ui_alive
from crazy_functions.crazy_utils import input_clipping

def inspect_dependency(chatbot, history):
# 尝试导入依赖,如果缺少依赖,则给出安装建议
Expand Down Expand Up @@ -95,6 +96,8 @@ def 动画生成(txt, llm_kwargs, plugin_kwargs, chatbot, history, system_prompt
res = eval_manim(code)

chatbot.append(("生成的视频文件路径", res))
if os.path.exists(res):
promote_file_to_downloadzone(res, chatbot=chatbot)
yield from update_ui(chatbot=chatbot, history=history) # 刷新界面 # 界面更新

# 在这里放一些网上搜集的demo,辅助gpt生成代码
Expand Down

0 comments on commit 3b83279

Please sign in to comment.