jost commited on
Commit
bd648f1
·
verified ·
1 Parent(s): dbc5abe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -147,15 +147,18 @@ def main():
147
  output2 = gr.Textbox(label="Model 2 Response")
148
 
149
  with gr.Tab("Settings"):
150
- with gr.Column():
151
- api_key_input = gr.Textbox(label="API Key", placeholder="Enter your API key here", show_label=True, type="password")
 
 
 
152
  temp_input = gr.Slider(minimum=0, maximum=1, step=0.01, label="Temperature", value=0.7)
153
  top_p_input = gr.Slider(minimum=0, maximum=1, step=0.01, label="Top P", value=1)
154
 
155
  # Link settings to the predict function
156
  submit_btn.click(
157
  fn=predict,
158
- inputs=[api_key_input, model_selector1, model_selector2, prompt_manipulation, direct_steering_option, ideology_test, political_statement, temp_input, top_p_input],
159
  outputs=[output1, output2]
160
  )
161
 
 
147
  output2 = gr.Textbox(label="Model 2 Response")
148
 
149
  with gr.Tab("Settings"):
150
+ with gr.Row():
151
+ openai_api_key = gr.Textbox(label="OpenAI API Key", placeholder="Enter your OpenAI API key here", show_label=True, type="password")
152
+ togetherai_api_key = gr.Textbox(label="Together.ai API Key", placeholder="Enter your Together.ai API key here", show_label=True, type="password")
153
+
154
+ with gr.Row()
155
  temp_input = gr.Slider(minimum=0, maximum=1, step=0.01, label="Temperature", value=0.7)
156
  top_p_input = gr.Slider(minimum=0, maximum=1, step=0.01, label="Top P", value=1)
157
 
158
  # Link settings to the predict function
159
  submit_btn.click(
160
  fn=predict,
161
+ inputs=[openai_api_key, togetherai_api_key, model_selector1, model_selector2, prompt_manipulation, direct_steering_option, ideology_test, political_statement, temp_input, top_p_input],
162
  outputs=[output1, output2]
163
  )
164