Tonic commited on
Commit
31005d2
1 Parent(s): d91cc69

Update maker.py

Browse files
Files changed (1) hide show
  1. maker.py +5 -5
maker.py CHANGED
@@ -97,19 +97,19 @@ def extract_title_prompt_example(text, title, system_prompt, example_input):
97
  prompt_start = -1
98
  example_start = -1
99
  try:
100
- title_start = text.lower().rfind("title:") + len("title:")
101
- prompt_start = text.lower().rfind("system prompt:")
102
  title = text[title_start:prompt_start].strip()
103
  except ValueError:
104
  pass
105
  try:
106
- prompt_start = text.lower().rfind("system prompt:") + len("system prompt:")
107
- example_start = text.lower().rfind("example input:")
108
  system_prompt = text[prompt_start:example_start].strip()
109
  except ValueError:
110
  pass
111
  try:
112
- example_start = text.lower().rfind("example input:") + len("example input:")
113
  example_input = text[example_start:].strip()
114
  example_input = example_input[:example_input.index("\n")]
115
  except ValueError:
 
97
  prompt_start = -1
98
  example_start = -1
99
  try:
100
+ title_start = text.lower().rfind("Title:") + len("Title:")
101
+ prompt_start = text.lower().rfind("System prompt:")
102
  title = text[title_start:prompt_start].strip()
103
  except ValueError:
104
  pass
105
  try:
106
+ prompt_start = text.lower().rfind("System prompt:") + len("System prompt:")
107
+ example_start = text.lower().rfind("Example input:")
108
  system_prompt = text[prompt_start:example_start].strip()
109
  except ValueError:
110
  pass
111
  try:
112
+ example_start = text.lower().rfind("Example input:") + len("Example input:")
113
  example_input = text[example_start:].strip()
114
  example_input = example_input[:example_input.index("\n")]
115
  except ValueError: