Wonderplex commited on
Commit
e140a93
·
unverified ·
1 Parent(s): 7df27b3

Fold Accordions (#73)

Browse files

* changed tab order

* folded accordion except essential info

Files changed (1) hide show
  1. sotopia_space/chat.py +5 -6
sotopia_space/chat.py CHANGED
@@ -165,7 +165,7 @@ def create_bot_goal(environment_dropdown):
165
  def sotopia_info_accordion(accordion_visible=True):
166
  environments, _, _, _ = get_sotopia_profiles()
167
 
168
- with gr.Accordion("Create your sotopia space!", open=accordion_visible):
169
  with gr.Row():
170
  environment_dropdown = gr.Dropdown(
171
  choices=environments,
@@ -183,6 +183,10 @@ def sotopia_info_accordion(accordion_visible=True):
183
  with gr.Row():
184
  user_agent_dropdown = create_user_agent_dropdown(environment_dropdown.value)
185
  bot_agent_dropdown = create_bot_agent_dropdown(environment_dropdown.value, user_agent_dropdown.value)
 
 
 
 
186
 
187
  with gr.Accordion("Check your social task!", open=accordion_visible):
188
 
@@ -193,11 +197,6 @@ def sotopia_info_accordion(accordion_visible=True):
193
  user_goal_display = create_user_goal(environment_dropdown.value)
194
 
195
 
196
-
197
- with gr.Row():
198
- bot_agent_info_display = create_bot_info(bot_agent_dropdown.value)
199
- user_agent_info_display = create_user_info(user_agent_dropdown.value)
200
-
201
  # Update user dropdown when scenario changes
202
  environment_dropdown.change(fn=create_user_agent_dropdown, inputs=[environment_dropdown], outputs=[user_agent_dropdown])
203
  # Update bot dropdown when user or scenario changes
 
165
  def sotopia_info_accordion(accordion_visible=True):
166
  environments, _, _, _ = get_sotopia_profiles()
167
 
168
+ with gr.Accordion("Create your sotopia space!", open=False, visible=accordion_visible):
169
  with gr.Row():
170
  environment_dropdown = gr.Dropdown(
171
  choices=environments,
 
183
  with gr.Row():
184
  user_agent_dropdown = create_user_agent_dropdown(environment_dropdown.value)
185
  bot_agent_dropdown = create_bot_agent_dropdown(environment_dropdown.value, user_agent_dropdown.value)
186
+
187
+ with gr.Row():
188
+ user_agent_info_display = create_user_info(user_agent_dropdown.value)
189
+ bot_agent_info_display = create_bot_info(bot_agent_dropdown.value)
190
 
191
  with gr.Accordion("Check your social task!", open=accordion_visible):
192
 
 
197
  user_goal_display = create_user_goal(environment_dropdown.value)
198
 
199
 
 
 
 
 
 
200
  # Update user dropdown when scenario changes
201
  environment_dropdown.change(fn=create_user_agent_dropdown, inputs=[environment_dropdown], outputs=[user_agent_dropdown])
202
  # Update bot dropdown when user or scenario changes