Added {Script_1st_half} to the input if no extra info was given (fix)
Browse files
app.py
CHANGED
|
@@ -216,7 +216,9 @@ def process_inputs(EPA_title, Extra_input, Department):
|
|
| 216 |
{"role": "user", "content": UserPrompt_20},
|
| 217 |
{"role": "assistant", "content": AssistantPrompt_20},
|
| 218 |
{"role": "user", "content": f"""Topic of the tutorial: {EPA_title}
|
| 219 |
-
The tutorial should be aimed at employees in a {Department} department.
|
|
|
|
|
|
|
| 220 |
]
|
| 221 |
Script_2nd_half = api_call(stepTwo, 0.7)
|
| 222 |
Script_complete = Script_1st_half + "\n\n" + Script_2nd_half
|
|
@@ -275,9 +277,9 @@ departments = {
|
|
| 275 |
iface = gr.Interface(
|
| 276 |
fn=process_inputs,
|
| 277 |
inputs=[
|
| 278 |
-
gr.Textbox(lines=2, label='EPA
|
| 279 |
-
gr.Textbox(lines=2, label='Extra input
|
| 280 |
-
gr.Dropdown(choices=departments, label="Select
|
| 281 |
],
|
| 282 |
outputs=gr.Textbox(label="Script", show_copy_button=True)
|
| 283 |
)
|
|
|
|
| 216 |
{"role": "user", "content": UserPrompt_20},
|
| 217 |
{"role": "assistant", "content": AssistantPrompt_20},
|
| 218 |
{"role": "user", "content": f"""Topic of the tutorial: {EPA_title}
|
| 219 |
+
The tutorial should be aimed at employees in a {Department} department.
|
| 220 |
+
|
| 221 |
+
{Script_1st_half}"""}
|
| 222 |
]
|
| 223 |
Script_2nd_half = api_call(stepTwo, 0.7)
|
| 224 |
Script_complete = Script_1st_half + "\n\n" + Script_2nd_half
|
|
|
|
| 277 |
iface = gr.Interface(
|
| 278 |
fn=process_inputs,
|
| 279 |
inputs=[
|
| 280 |
+
gr.Textbox(lines=2, label='EPA description here... (use the phrasing: "How to do X using ChatGPT")'),
|
| 281 |
+
gr.Textbox(lines=2, label='Extra input here... (optional, put any extra requirements or relevant context)'),
|
| 282 |
+
gr.Dropdown(choices=departments, label="Select team", searchable=True)
|
| 283 |
],
|
| 284 |
outputs=gr.Textbox(label="Script", show_copy_button=True)
|
| 285 |
)
|