Update app.py
Browse files
app.py
CHANGED
@@ -111,9 +111,9 @@ with gr.Blocks(css=css) as demo:
|
|
111 |
total_tokens_str = gr.Markdown(elem_id="total_tokens_str")
|
112 |
btn_clear_conversation = gr.Button("π Start New Conversation")
|
113 |
with gr.Column():
|
114 |
-
user_token = gr.Textbox(value='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', placeholder="OpenAI API Key", type="
|
115 |
prompt_template = gr.Dropdown(label="Set a custom insruction for the chatbot:", choices=list(prompt_templates.keys()))
|
116 |
-
prompt_template_preview = gr.
|
117 |
with gr.Accordion("Advanced parameters", open=False):
|
118 |
temperature = gr.Slider(minimum=0, maximum=2.0, value=0.7, step=0.1, label="Temperature", info="Higher = more creative/chaotic")
|
119 |
max_tokens = gr.Slider(minimum=100, maximum=4096, value=1000, step=1, label="Max tokens per response")
|
|
|
111 |
total_tokens_str = gr.Markdown(elem_id="total_tokens_str")
|
112 |
btn_clear_conversation = gr.Button("π Start New Conversation")
|
113 |
with gr.Column():
|
114 |
+
user_token = gr.Textbox(value='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', placeholder="OpenAI API Key", type="hidden", show_label=False)
|
115 |
prompt_template = gr.Dropdown(label="Set a custom insruction for the chatbot:", choices=list(prompt_templates.keys()))
|
116 |
+
prompt_template_preview = gr.Textbox(value="prompt_template_preview", type="text", show_label=False)
|
117 |
with gr.Accordion("Advanced parameters", open=False):
|
118 |
temperature = gr.Slider(minimum=0, maximum=2.0, value=0.7, step=0.1, label="Temperature", info="Higher = more creative/chaotic")
|
119 |
max_tokens = gr.Slider(minimum=100, maximum=4096, value=1000, step=1, label="Max tokens per response")
|