Spaces:
Runtime error
Runtime error
Commit
·
ae0d311
1
Parent(s):
7723c78
add pre_filter flag
Browse files
app.py
CHANGED
|
@@ -13,6 +13,9 @@ class GPT4News():
|
|
| 13 |
self.name2prompt = {x['name']: x for x in prompt_formats}
|
| 14 |
|
| 15 |
def preprocess(self, function_name, input_txt):
|
|
|
|
|
|
|
|
|
|
| 16 |
max_length = self.name2prompt[function_name]['split_length']
|
| 17 |
max_convs = self.name2prompt[function_name]['split_round']
|
| 18 |
|
|
|
|
| 13 |
self.name2prompt = {x['name']: x for x in prompt_formats}
|
| 14 |
|
| 15 |
def preprocess(self, function_name, input_txt):
|
| 16 |
+
if not self.name2prompt[function_name]['pre_filter']:
|
| 17 |
+
return [input_txt]
|
| 18 |
+
|
| 19 |
max_length = self.name2prompt[function_name]['split_length']
|
| 20 |
max_convs = self.name2prompt[function_name]['split_round']
|
| 21 |
|