Spaces:
Runtime error
Runtime error
minor change to layout
Browse files- sotopia_space/chat.py +7 -6
sotopia_space/chat.py
CHANGED
@@ -182,16 +182,17 @@ def sotopia_info_accordion(accordion_visible=True):
|
|
182 |
user_agent_dropdown = create_user_agent_dropdown(environment_dropdown.value)
|
183 |
bot_agent_dropdown = create_bot_agent_dropdown(environment_dropdown.value, user_agent_dropdown.value)
|
184 |
|
185 |
-
with gr.Row():
|
186 |
-
user_agent_info_display = create_user_info(user_agent_dropdown.value)
|
187 |
-
bot_agent_info_display = create_bot_info(bot_agent_dropdown.value)
|
188 |
|
189 |
with gr.Accordion("Check your social task!", open=accordion_visible):
|
190 |
|
191 |
scenario_info_display = create_environment_info(environment_dropdown.value)
|
192 |
|
193 |
with gr.Row():
|
194 |
-
|
|
|
|
|
|
|
|
|
195 |
user_goal_display = create_user_goal(environment_dropdown.value)
|
196 |
|
197 |
|
@@ -208,7 +209,7 @@ def sotopia_info_accordion(accordion_visible=True):
|
|
208 |
# Update user goal when scenario changes
|
209 |
environment_dropdown.change(fn=create_user_goal, inputs=[environment_dropdown], outputs=[user_goal_display])
|
210 |
# Update bot goal when scenario changes
|
211 |
-
environment_dropdown.change(fn=create_bot_goal, inputs=[environment_dropdown], outputs=[bot_goal_display])
|
212 |
|
213 |
return model_name_dropdown, environment_dropdown, user_agent_dropdown, bot_agent_dropdown
|
214 |
|
@@ -252,7 +253,7 @@ def chat_tab():
|
|
252 |
|
253 |
with gr.Column():
|
254 |
with gr.Accordion("Start the conversation to achieve your goal!", open=True):
|
255 |
-
gr.ChatInterface(
|
256 |
fn=run_chat,
|
257 |
chatbot=gr.Chatbot(
|
258 |
height=620,
|
|
|
182 |
user_agent_dropdown = create_user_agent_dropdown(environment_dropdown.value)
|
183 |
bot_agent_dropdown = create_bot_agent_dropdown(environment_dropdown.value, user_agent_dropdown.value)
|
184 |
|
|
|
|
|
|
|
185 |
|
186 |
with gr.Accordion("Check your social task!", open=accordion_visible):
|
187 |
|
188 |
scenario_info_display = create_environment_info(environment_dropdown.value)
|
189 |
|
190 |
with gr.Row():
|
191 |
+
user_agent_info_display = create_user_info(user_agent_dropdown.value)
|
192 |
+
bot_agent_info_display = create_bot_info(bot_agent_dropdown.value)
|
193 |
+
|
194 |
+
with gr.Row():
|
195 |
+
# bot_goal_display = create_bot_goal(environment_dropdown.value)
|
196 |
user_goal_display = create_user_goal(environment_dropdown.value)
|
197 |
|
198 |
|
|
|
209 |
# Update user goal when scenario changes
|
210 |
environment_dropdown.change(fn=create_user_goal, inputs=[environment_dropdown], outputs=[user_goal_display])
|
211 |
# Update bot goal when scenario changes
|
212 |
+
# environment_dropdown.change(fn=create_bot_goal, inputs=[environment_dropdown], outputs=[bot_goal_display])
|
213 |
|
214 |
return model_name_dropdown, environment_dropdown, user_agent_dropdown, bot_agent_dropdown
|
215 |
|
|
|
253 |
|
254 |
with gr.Column():
|
255 |
with gr.Accordion("Start the conversation to achieve your goal!", open=True):
|
256 |
+
chat_interface = gr.ChatInterface(
|
257 |
fn=run_chat,
|
258 |
chatbot=gr.Chatbot(
|
259 |
height=620,
|