Tonic commited on
Commit
e4df492
·
1 Parent(s): 53e329e

Update maker.py

Browse files
Files changed (1) hide show
  1. maker.py +6 -6
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("# 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
 
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