JessicaChen1854 commited on
Commit
b4ccbbf
·
verified ·
1 Parent(s): 1631019

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -75,7 +75,7 @@ def format_script(text):
75
  # 规范场景标题
76
  return re.sub(r"(?<!### )场景\d+", r"### 场景\g<0>", text)
77
 
78
- # 加载pipeline
79
  script_pipe, storyboard_pipe, image_pipe = load_pipelines()
80
  # script_pipe, storyboard_pipe, music_pipe, image_pipe = load_pipelines()
81
 
@@ -115,7 +115,7 @@ if user_input:
115
 
116
  # 显示结果
117
  st.subheader("生成剧本")
118
- st.markdown(f"```markdown\n{cleaned}\n```")
119
  status.update(label="✅ 生成完成", state="complete")
120
 
121
  except Exception as e:
 
75
  # 规范场景标题
76
  return re.sub(r"(?<!### )场景\d+", r"### 场景\g<0>", text)
77
 
78
+ # 加载pipeline
79
  script_pipe, storyboard_pipe, image_pipe = load_pipelines()
80
  # script_pipe, storyboard_pipe, music_pipe, image_pipe = load_pipelines()
81
 
 
115
 
116
  # 显示结果
117
  st.subheader("生成剧本")
118
+ st.markdown(f"```markdown\n{format_script(response)}\n```")
119
  status.update(label="✅ 生成完成", state="complete")
120
 
121
  except Exception as e: