Update maker.py
Browse files
maker.py
CHANGED
@@ -120,14 +120,14 @@ def extract_title_prompt_example(text):
|
|
120 |
found_title, found_prompt, found_example = False, False, False
|
121 |
|
122 |
for line in lines:
|
123 |
-
if not found_example and line.startswith("
|
124 |
-
example_input = line.replace("
|
125 |
found_example = True
|
126 |
-
elif not found_prompt and line.startswith("
|
127 |
-
system_prompt = line.replace("
|
128 |
found_prompt = True
|
129 |
-
elif not found_title and line.startswith("
|
130 |
-
title = line.replace("
|
131 |
found_title = True
|
132 |
|
133 |
# Break the loop if all sections are found
|
|
|
120 |
found_title, found_prompt, found_example = False, False, False
|
121 |
|
122 |
for line in lines:
|
123 |
+
if not found_example and line.startswith("Example input:"):
|
124 |
+
example_input = line.replace("Example input:", "").strip()
|
125 |
found_example = True
|
126 |
+
elif not found_prompt and line.startswith("System prompt:"):
|
127 |
+
system_prompt = line.replace("System prompt:", "").strip()
|
128 |
found_prompt = True
|
129 |
+
elif not found_title and line.startswith("Title:"):
|
130 |
+
title = line.replace("Title:", "").strip()
|
131 |
found_title = True
|
132 |
|
133 |
# Break the loop if all sections are found
|