BtB-ExpC commited on
Commit
cc57ab2
·
1 Parent(s): d174264

removed "Extra info" from prompt when no value is given for it by user

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -144,8 +144,16 @@ def process_inputs(EPA_title, Department, Extra_input):
144
  # Check if EPA_title and/or Department are empty
145
  if not EPA_title and not Department:
146
  return manual
 
 
 
 
 
 
 
 
147
  else:
148
- # Step 1: User input and first API call ~5secs
149
  stepOne = [
150
  {"role": "system", "content": SystemPrompt_10},
151
  {"role": "user", "content": UserPrompt_10},
 
144
  # Check if EPA_title and/or Department are empty
145
  if not EPA_title and not Department:
146
  return manual
147
+ if not Extra_input:
148
+ stepOne = [
149
+ {"role": "system", "content": SystemPrompt_10},
150
+ {"role": "user", "content": UserPrompt_10},
151
+ {"role": "assistant", "content": AssistantPrompt_10},
152
+ {"role": "user", "content": f"""Create a script for teaching an employee: {EPA_title}
153
+ The target audience is: a professional in a {Department} team."""}
154
+ ]
155
  else:
156
+ # Step 1: User input and first API call ~5secs
157
  stepOne = [
158
  {"role": "system", "content": SystemPrompt_10},
159
  {"role": "user", "content": UserPrompt_10},