Tonic commited on
Commit
f387b9b
1 Parent(s): 323ae96

Update maker.py

Browse files
Files changed (1) hide show
  1. maker.py +9 -0
maker.py CHANGED
@@ -83,6 +83,15 @@ def predict_beta(message, chatbot=[], system_prompt=system_prompt, max_new_token
83
  raise gr.Error(error_msg)
84
 
85
  def extract_title_prompt_example(text, title, system_prompt, example_input):
 
 
 
 
 
 
 
 
 
86
  try:
87
  title_start = text.lower().find("title:") + len("title:")
88
  if title_start >= len("title:"):
 
83
  raise gr.Error(error_msg)
84
 
85
  def extract_title_prompt_example(text, title, system_prompt, example_input):
86
+ # Default values if the expected format is not found
87
+ default_title = "Custom GPT Agent"
88
+ default_system_prompt = "This is a custom GPT agent."
89
+ default_example_input = "Type your query here."
90
+
91
+ # Initialize variables
92
+ title_start = -1
93
+ prompt_start = -1
94
+ example_start = -1
95
  try:
96
  title_start = text.lower().find("title:") + len("title:")
97
  if title_start >= len("title:"):