Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,7 +11,8 @@ tokenizer = AutoTokenizer.from_pretrained(model_name)
|
|
| 11 |
with strategy.scope():
|
| 12 |
model = TFBlenderbotForConditionalGeneration.from_pretrained(model_name)
|
| 13 |
|
| 14 |
-
def save_question(question,answer,path = "
|
|
|
|
| 15 |
with open(path, "r") as file:
|
| 16 |
data = json.load(file)
|
| 17 |
data["Interactions"].append({"Question:":question,"Answer:":answer})
|
|
|
|
| 11 |
with strategy.scope():
|
| 12 |
model = TFBlenderbotForConditionalGeneration.from_pretrained(model_name)
|
| 13 |
|
| 14 |
+
def save_question(question,answer,path = "question_answer.json"):
|
| 15 |
+
print(f"Saving data to: {os.path.abspath(path)}")
|
| 16 |
with open(path, "r") as file:
|
| 17 |
data = json.load(file)
|
| 18 |
data["Interactions"].append({"Question:":question,"Answer:":answer})
|