wdplx commited on
Commit
46af8b2
1 Parent(s): 00fbf49

chat ui change

Browse files
Files changed (1) hide show
  1. sotopia_space/chat.py +5 -5
sotopia_space/chat.py CHANGED
@@ -121,19 +121,19 @@ def create_environment_info(environment_dropdown):
121
  _, environment_dict, _, _ = get_sotopia_profiles()
122
  environment = environment_dict[environment_dropdown]
123
  text = environment.scenario
124
- return gr.Textbox(label="Scenario", lines=1, value=text)
125
 
126
  def create_user_info(user_agent_dropdown):
127
  _, _, agent_dict, _ = get_sotopia_profiles()
128
  user_agent = agent_dict[user_agent_dropdown]
129
  text = f"{user_agent.background} {user_agent.personality}"
130
- return gr.Textbox(label="User Agent Profile", lines=4, value=text)
131
 
132
  def create_bot_info(bot_agent_dropdown):
133
  _, _, agent_dict, _ = get_sotopia_profiles()
134
  bot_agent = agent_dict[bot_agent_dropdown]
135
  text = f"{bot_agent.background} {bot_agent.personality}"
136
- return gr.Textbox(label="Bot Agent Profile", lines=4, value=text)
137
 
138
  def create_user_goal(environment_dropdown):
139
  _, environment_dict, _, _ = get_sotopia_profiles()
@@ -148,7 +148,7 @@ def create_user_goal(environment_dropdown):
148
  if "<clarification_hint>" in text:
149
  text = text.replace("<clarification_hint>", "\n\n")
150
  text = text.replace("</clarification_hint>", "\n")
151
- return gr.Textbox(label="User Agent Goal", lines=4, value=text)
152
 
153
  def create_bot_goal(environment_dropdown):
154
  _, environment_dict, _, _ = get_sotopia_profiles()
@@ -160,7 +160,7 @@ def create_bot_goal(environment_dropdown):
160
  if "<strategy_hint>" in text:
161
  text = text.replace("<strategy_hint>", "\n\n")
162
  text = text.replace("</strategy_hint>", "\n")
163
- return gr.Textbox(label="Bot Agent Goal", lines=4, value=text)
164
 
165
  def sotopia_info_accordion(accordion_visible=True):
166
  environments, _, _, _ = get_sotopia_profiles()
 
121
  _, environment_dict, _, _ = get_sotopia_profiles()
122
  environment = environment_dict[environment_dropdown]
123
  text = environment.scenario
124
+ return gr.Textbox(label="Scenario", lines=2, value=text)
125
 
126
  def create_user_info(user_agent_dropdown):
127
  _, _, agent_dict, _ = get_sotopia_profiles()
128
  user_agent = agent_dict[user_agent_dropdown]
129
  text = f"{user_agent.background} {user_agent.personality}"
130
+ return gr.Textbox(label="User Agent Profile", lines=5, value=text)
131
 
132
  def create_bot_info(bot_agent_dropdown):
133
  _, _, agent_dict, _ = get_sotopia_profiles()
134
  bot_agent = agent_dict[bot_agent_dropdown]
135
  text = f"{bot_agent.background} {bot_agent.personality}"
136
+ return gr.Textbox(label="Bot Agent Profile", lines=5, value=text)
137
 
138
  def create_user_goal(environment_dropdown):
139
  _, environment_dict, _, _ = get_sotopia_profiles()
 
148
  if "<clarification_hint>" in text:
149
  text = text.replace("<clarification_hint>", "\n\n")
150
  text = text.replace("</clarification_hint>", "\n")
151
+ return gr.Textbox(label="User Agent Goal", lines=5, value=text)
152
 
153
  def create_bot_goal(environment_dropdown):
154
  _, environment_dict, _, _ = get_sotopia_profiles()
 
160
  if "<strategy_hint>" in text:
161
  text = text.replace("<strategy_hint>", "\n\n")
162
  text = text.replace("</strategy_hint>", "\n")
163
+ return gr.Textbox(label="Bot Agent Goal", lines=5, value=text)
164
 
165
  def sotopia_info_accordion(accordion_visible=True):
166
  environments, _, _, _ = get_sotopia_profiles()