youngtsai commited on
Commit
82ec76e
·
1 Parent(s): b231fae

file_name = "dialogue_output.json"

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -20,10 +20,11 @@ def main_function(rounds: int, method: str, role1: str, role2: str):
20
  json_output = json.dumps({"dialogue": dialogue}, ensure_ascii=False, indent=4)
21
 
22
  # 儲存對話為 JSON 文件
23
- with open("dialogue_output_json.txt", "w", encoding="utf-8") as f:
 
24
  f.write(json_output)
25
 
26
- return dialogue, audio_path, "dialogue_output.json"
27
 
28
 
29
  def dialogue_to_audio(dialogue):
 
20
  json_output = json.dumps({"dialogue": dialogue}, ensure_ascii=False, indent=4)
21
 
22
  # 儲存對話為 JSON 文件
23
+ file_name = "dialogue_output.json"
24
+ with open(file_name, "w", encoding="utf-8") as f:
25
  f.write(json_output)
26
 
27
+ return dialogue, audio_path, file_name
28
 
29
 
30
  def dialogue_to_audio(dialogue):