Spaces:
Sleeping
Sleeping
Fix corner cases
Browse files
app.py
CHANGED
@@ -137,9 +137,32 @@ class AnnotationManager:
|
|
137 |
path_or_fileobj=human2_annotation_file,
|
138 |
)
|
139 |
|
140 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
141 |
|
142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
|
144 |
def get_rouge(self):
|
145 |
try:
|
|
|
137 |
path_or_fileobj=human2_annotation_file,
|
138 |
)
|
139 |
|
140 |
+
next_headline, next_text = self.get_next()
|
141 |
+
return (
|
142 |
+
next_headline,
|
143 |
+
next_text,
|
144 |
+
self.get_rouge(),
|
145 |
+
self.progress(),
|
146 |
+
"",
|
147 |
+
)
|
148 |
+
|
149 |
+
if self.current is not None:
|
150 |
+
return (
|
151 |
+
self.current["web_headline"],
|
152 |
+
self.current["web_text"],
|
153 |
+
self.get_rouge(),
|
154 |
+
self.progress(),
|
155 |
+
"",
|
156 |
+
)
|
157 |
|
158 |
+
else:
|
159 |
+
return (
|
160 |
+
"Pulsa ▶️",
|
161 |
+
"Pulsa ▶️",
|
162 |
+
"Pulsa ▶️",
|
163 |
+
self.progress(),
|
164 |
+
"",
|
165 |
+
)
|
166 |
|
167 |
def get_rouge(self):
|
168 |
try:
|