WICKED4950 commited on
Commit
8c3d406
·
verified ·
1 Parent(s): 9a420f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -14,7 +14,7 @@ with strategy.scope():
14
  def save_question(question,answer,path = "question_answer.json"):
15
  with open(path, "r") as file:
16
  data = json.load(file)
17
- data.append({"Question:":question,"Answer:":answer})
18
  with open(path, "w") as file:
19
  json.dump(data, file, indent=4)
20
  print("saving question")
 
14
  def save_question(question,answer,path = "question_answer.json"):
15
  with open(path, "r") as file:
16
  data = json.load(file)
17
+ data["Interactions"].append({"Question:":question,"Answer:":answer})
18
  with open(path, "w") as file:
19
  json.dump(data, file, indent=4)
20
  print("saving question")