Spaces:
Running
Running
Update app.py
Browse files
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")
|