Spaces:
Sleeping
Sleeping
Adding separators in dropdown menu
Browse files- web_demo/app.py +34 -2
- web_demo/templates/index.html +1 -1
web_demo/app.py
CHANGED
@@ -41,6 +41,40 @@ env_label_to_env_name = {
|
|
41 |
"Scaffolding (train - scaf_8: Phase 1)": "SocialAI-AELangFeedbackTrainScaffoldingCSParamEnv-v1",
|
42 |
"Scaffolding/Formats (test)":"SocialAI-AELangFeedbackTrainFormatsCSParamEnv-v1",
|
43 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
global env_name
|
46 |
global env_label
|
@@ -206,8 +240,6 @@ def index():
|
|
206 |
# bubble_text = format_bubble_text(env.current_env.full_conversation)
|
207 |
bubble_text = create_bubble_text(obs, info, env.current_env.full_conversation, textual_observations)
|
208 |
|
209 |
-
available_env_labels = env_label_to_env_name.keys()
|
210 |
-
|
211 |
grammar_templates = env.grammar.templates
|
212 |
grammar_words = env.grammar.things
|
213 |
|
|
|
41 |
"Scaffolding (train - scaf_8: Phase 1)": "SocialAI-AELangFeedbackTrainScaffoldingCSParamEnv-v1",
|
42 |
"Scaffolding/Formats (test)":"SocialAI-AELangFeedbackTrainFormatsCSParamEnv-v1",
|
43 |
}
|
44 |
+
available_env_labels = [
|
45 |
+
"Full SocialAI environment",
|
46 |
+
"---- Pointing ----",
|
47 |
+
"Pointing (Train)",
|
48 |
+
"Pointing (Test)",
|
49 |
+
"---- Role Reversal ----",
|
50 |
+
"Role Reversal Single Role B (Pretrain - experimental)",
|
51 |
+
"Role Reversal Single Asocial (Pretrain - control)",
|
52 |
+
"Role Reversal Group Role B (Pretrain - experimental)",
|
53 |
+
"Role Reversal Group Asocial (Pretrain - control)",
|
54 |
+
"Role Reversal Role A (Finetune - test)",
|
55 |
+
"---- Imitation ----",
|
56 |
+
"Imitation (Train)",
|
57 |
+
"Imitation (Test)",
|
58 |
+
"---- TextWorld (LLM experiments) ----",
|
59 |
+
"AsocialBox (textworld)",
|
60 |
+
"ColorBoxes (textworld)",
|
61 |
+
"---- Language Color ----",
|
62 |
+
"Language Color (Train)",
|
63 |
+
"Language Color (Test)",
|
64 |
+
"---- Language Feedback ----",
|
65 |
+
"Language Feedback (Train)",
|
66 |
+
"Language Feedback (Test)",
|
67 |
+
"---- Joint Attention Language Color ----",
|
68 |
+
"Joint Attention Language Color (Train)",
|
69 |
+
"Joint Attention Language Color (Test)",
|
70 |
+
"---- Apple Stealing ----",
|
71 |
+
"Apple stealing",
|
72 |
+
"Apple stealing (Occlusions)",
|
73 |
+
"---- Scaffolding/Formats ----",
|
74 |
+
"Scaffolding (train - scaf_8: Phase 1)",
|
75 |
+
"Scaffolding/Formats (test)"
|
76 |
+
]
|
77 |
+
assert all([l in available_env_labels for l in env_label_to_env_name.keys()])
|
78 |
|
79 |
global env_name
|
80 |
global env_label
|
|
|
240 |
# bubble_text = format_bubble_text(env.current_env.full_conversation)
|
241 |
bubble_text = create_bubble_text(obs, info, env.current_env.full_conversation, textual_observations)
|
242 |
|
|
|
|
|
243 |
grammar_templates = env.grammar.templates
|
244 |
grammar_words = env.grammar.things
|
245 |
|
web_demo/templates/index.html
CHANGED
@@ -337,7 +337,7 @@
|
|
337 |
<form method="post" action="/set_env" id="envForm">
|
338 |
<select name="env_label" onchange="document.getElementById('envForm').submit();">
|
339 |
{% for env in available_env_labels %}
|
340 |
-
<option value="{{ env }}" {% if env == current_env_label %}selected{% endif %}>{{ env }}</option>
|
341 |
{% endfor %}
|
342 |
</select>
|
343 |
</form>
|
|
|
337 |
<form method="post" action="/set_env" id="envForm">
|
338 |
<select name="env_label" onchange="document.getElementById('envForm').submit();">
|
339 |
{% for env in available_env_labels %}
|
340 |
+
<option value="{{ env }}" {% if env == current_env_label %}selected{% endif %} {% if env.startswith("-")%}disabled{% endif %}>{{ env }}</option>
|
341 |
{% endfor %}
|
342 |
</select>
|
343 |
</form>
|