santoR commited on
Commit
5337430
1 Parent(s): 9d474da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -111,13 +111,13 @@ with gr.Blocks(css=css) as demo:
111
  btn_submit = gr.Button("Submit")
112
  total_tokens_str = gr.Markdown(elem_id="total_tokens_str")
113
  btn_clear_conversation = gr.Button("🔃 Start New Conversation")
114
- with gr.Column():
115
  #gr.Markdown("aqui Enter your OpenAI API Key. You can get one [here](https://platform.openai.com/account/api-keys).", elem_id="label")
116
  user_token = gr.Textbox(value='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', placeholder="OpenAI API Key", type="password", show_label=False, visible=False)
117
  #user_token = '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'
118
  prompt_template = gr.Dropdown(label="Set a custom insruction for the chatbot:", choices=list(prompt_templates.keys()),visible=False)
119
  prompt_template_preview = gr.Markdown(elem_id="prompt_template_preview",visible=False)
120
- with gr.Accordion("Advanced parameters", open=False):
121
  temperature = gr.Slider(minimum=0, maximum=2.0, value=0.7, step=0.1, label="Temperature", info="Higher = more creative/chaotic")
122
  max_tokens = gr.Slider(minimum=100, maximum=4096, value=1000, step=1, label="Max tokens per response")
123
  context_length = gr.Slider(minimum=1, maximum=10, value=2, step=1, label="Context length", info="Number of previous messages to send to the chatbot. Be careful with high values, it can blow up the token budget quickly.")
 
111
  btn_submit = gr.Button("Submit")
112
  total_tokens_str = gr.Markdown(elem_id="total_tokens_str")
113
  btn_clear_conversation = gr.Button("🔃 Start New Conversation")
114
+ with gr.Column(visible=False):
115
  #gr.Markdown("aqui Enter your OpenAI API Key. You can get one [here](https://platform.openai.com/account/api-keys).", elem_id="label")
116
  user_token = gr.Textbox(value='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', placeholder="OpenAI API Key", type="password", show_label=False, visible=False)
117
  #user_token = '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'
118
  prompt_template = gr.Dropdown(label="Set a custom insruction for the chatbot:", choices=list(prompt_templates.keys()),visible=False)
119
  prompt_template_preview = gr.Markdown(elem_id="prompt_template_preview",visible=False)
120
+ with gr.Accordion("Advanced parameters", open=False,visible=False):
121
  temperature = gr.Slider(minimum=0, maximum=2.0, value=0.7, step=0.1, label="Temperature", info="Higher = more creative/chaotic")
122
  max_tokens = gr.Slider(minimum=100, maximum=4096, value=1000, step=1, label="Max tokens per response")
123
  context_length = gr.Slider(minimum=1, maximum=10, value=2, step=1, label="Context length", info="Number of previous messages to send to the chatbot. Be careful with high values, it can blow up the token budget quickly.")