Skip to content

Commit

Permalink
llm supports advertisegen
Browse files Browse the repository at this point in the history
  • Loading branch information
gongenlei committed Aug 1, 2023
1 parent e8a03e4 commit af7c4ad
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion paddlenlp/datasets/advertisegen.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -64,5 +65,11 @@ def _read(self, filename, *args):
continue
json_data = json.loads(line)

yield {"source": json_data["content"], "target": json_data.get("summary", ""), "id": data_id}
yield {
"source": json_data["content"],
"src": json_data["content"],
"target": json_data.get("summary", ""),
"tgt": json_data.get("summary", ""),
"id": data_id,
}
data_id += 1

0 comments on commit af7c4ad

Please sign in to comment.