Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
pminervini
commited on
Commit
•
bb44a0c
1
Parent(s):
e394fbd
update
Browse files
src/backend/tasks/cnndm/task_v2.py
CHANGED
@@ -100,12 +100,16 @@ class CNNDMv2(ConfigurableTask):
|
|
100 |
def test_docs(self):
|
101 |
return self.dataset["test"]
|
102 |
|
103 |
-
def custom_prompt(self):
|
104 |
-
|
105 |
-
|
|
|
|
|
|
|
106 |
|
|
|
107 |
def doc_to_text(self, doc):
|
108 |
-
return f'
|
109 |
|
110 |
@staticmethod
|
111 |
def should_decontaminate():
|
|
|
100 |
def test_docs(self):
|
101 |
return self.dataset["test"]
|
102 |
|
103 |
+
# def custom_prompt(self):
|
104 |
+
# res = "Provide a summary of the provided article."
|
105 |
+
# return res
|
106 |
+
|
107 |
+
# def fewshot_delimiter(self):
|
108 |
+
# return "\n\n"
|
109 |
|
110 |
+
# From https://arxiv.org/abs/2305.14739
|
111 |
def doc_to_text(self, doc):
|
112 |
+
return f'Article: {doc["article"]}\nSummarize the article. Summary:'
|
113 |
|
114 |
@staticmethod
|
115 |
def should_decontaminate():
|
src/backend/tasks/xsum/task_v2.py
CHANGED
@@ -92,12 +92,12 @@ class XSumv2(ConfigurableTask):
|
|
92 |
def test_docs(self):
|
93 |
return self.dataset["test"]
|
94 |
|
95 |
-
def
|
96 |
-
|
97 |
-
return res
|
98 |
|
|
|
99 |
def doc_to_text(self, doc):
|
100 |
-
return f'
|
101 |
|
102 |
def should_decontaminate(self):
|
103 |
return True
|
|
|
92 |
def test_docs(self):
|
93 |
return self.dataset["test"]
|
94 |
|
95 |
+
# def fewshot_delimiter(self):
|
96 |
+
# return "\n\n"
|
|
|
97 |
|
98 |
+
# From https://arxiv.org/abs/2305.14739
|
99 |
def doc_to_text(self, doc):
|
100 |
+
return f'Article: {doc["document"]}\nSummarize the article in one sentence. Summary:'
|
101 |
|
102 |
def should_decontaminate(self):
|
103 |
return True
|