Spaces:
Running
Running
ryanrwatkins
commited on
Commit
•
d62edfd
1
Parent(s):
a2107b5
Update app.py
Browse files
app.py
CHANGED
@@ -34,7 +34,7 @@ def download_prompt_templates():
|
|
34 |
prompt = row[1].strip('"')
|
35 |
description = row[2].strip('"')
|
36 |
prompt_templates[act] = prompt
|
37 |
-
|
38 |
|
39 |
except requests.exceptions.RequestException as e:
|
40 |
print(f"An error occurred while downloading prompt templates: {e}")
|
@@ -143,7 +143,7 @@ with gr.Blocks(css=css) as demo:
|
|
143 |
btn_submit.click(submit_message, [ input_message, prompt_template, temperature, max_tokens, context_length, state], [input_message, chatbot, total_tokens_str, state])
|
144 |
input_message.submit(submit_message, [ input_message, prompt_template, temperature, max_tokens, context_length, state], [input_message, chatbot, total_tokens_str, state])
|
145 |
btn_clear_conversation.click(clear_conversation, [], [input_message, chatbot, total_tokens_str, state])
|
146 |
-
prompt_template.change(on_prompt_template_change, inputs=[
|
147 |
|
148 |
|
149 |
|
|
|
34 |
prompt = row[1].strip('"')
|
35 |
description = row[2].strip('"')
|
36 |
prompt_templates[act] = prompt
|
37 |
+
|
38 |
|
39 |
except requests.exceptions.RequestException as e:
|
40 |
print(f"An error occurred while downloading prompt templates: {e}")
|
|
|
143 |
btn_submit.click(submit_message, [ input_message, prompt_template, temperature, max_tokens, context_length, state], [input_message, chatbot, total_tokens_str, state])
|
144 |
input_message.submit(submit_message, [ input_message, prompt_template, temperature, max_tokens, context_length, state], [input_message, chatbot, total_tokens_str, state])
|
145 |
btn_clear_conversation.click(clear_conversation, [], [input_message, chatbot, total_tokens_str, state])
|
146 |
+
prompt_template.change(on_prompt_template_change, inputs=[description], outputs=[prompt_template_preview])
|
147 |
|
148 |
|
149 |
|