Spaces:
Runtime error
Runtime error
Commit
·
69422d5
1
Parent(s):
a3c9ab3
Update app.py
Browse files
app.py
CHANGED
@@ -81,7 +81,7 @@ with gr.Blocks(
|
|
81 |
|
82 |
history = gr.State([])
|
83 |
token_count = gr.State([])
|
84 |
-
promptTemplates = gr.State(load_template(
|
85 |
user_api_key = gr.State(my_api_key)
|
86 |
TRUECOMSTANT = gr.State(True)
|
87 |
FALSECONSTANT = gr.State(False)
|
@@ -109,8 +109,8 @@ with gr.Blocks(
|
|
109 |
systemPromptTxt = gr.Textbox(show_label=True,placeholder=f"Set a custom insruction for the chatbot: You are a helpful assistant.",label="Custom prompt",value=initial_prompt,lines=10,).style(container=False)
|
110 |
|
111 |
with gr.Row():
|
112 |
-
templateSelectDropdown = gr.Dropdown(label="load from template",choices=load_template(
|
113 |
-
multiselect=False,value=load_template(
|
114 |
|
115 |
with gr.Tab(label="Settings"):
|
116 |
with gr.Column():
|
|
|
81 |
|
82 |
history = gr.State([])
|
83 |
token_count = gr.State([])
|
84 |
+
promptTemplates = gr.State(load_template('myprompts.json', mode=2))
|
85 |
user_api_key = gr.State(my_api_key)
|
86 |
TRUECOMSTANT = gr.State(True)
|
87 |
FALSECONSTANT = gr.State(False)
|
|
|
109 |
systemPromptTxt = gr.Textbox(show_label=True,placeholder=f"Set a custom insruction for the chatbot: You are a helpful assistant.",label="Custom prompt",value=initial_prompt,lines=10,).style(container=False)
|
110 |
|
111 |
with gr.Row():
|
112 |
+
templateSelectDropdown = gr.Dropdown(label="load from template",choices=load_template('myprompts.json', mode=1),
|
113 |
+
multiselect=False,value=load_template('myprompts.json', mode=1)[0],).style(container=False)
|
114 |
|
115 |
with gr.Tab(label="Settings"):
|
116 |
with gr.Column():
|