Spaces:
Configuration error
Configuration error
Tristan Thrush
commited on
Commit
β’
0bdf8a4
1
Parent(s):
3475137
make a little more similar to the anthropic interface
Browse files
app.py
CHANGED
@@ -109,8 +109,7 @@ with demo:
|
|
109 |
state_dict[f"response_{idx+1}"] = ""
|
110 |
state = gr.JSON(state_dict, visible=False)
|
111 |
|
112 |
-
gr.Markdown("#
|
113 |
-
gr.Markdown("Choose the best model output")
|
114 |
|
115 |
state_display = gr.Markdown(f"Your messages: 0/{TOTAL_CNT}")
|
116 |
|
@@ -137,7 +136,7 @@ with demo:
|
|
137 |
state["data"].append(metadata)
|
138 |
state["past_user_inputs"].append(txt)
|
139 |
|
140 |
-
past_conversation_string = "<br />".join(["<br />".join(["π: " + user_input, "π€: " + model_response]) for user_input, model_response in zip(state["past_user_inputs"], state["generated_responses"] + [""])])
|
141 |
return gr.update(visible=False), gr.update(visible=True), gr.update(visible=True, choices=responses, interactive=True, value=responses[0]), gr.update(value=past_conversation_string), state, gr.update(visible=False), gr.update(visible=False), gr.update(visible=False), new_state_md, dummy
|
142 |
|
143 |
def _select_response(selected_response, state, dummy):
|
@@ -183,7 +182,7 @@ with demo:
|
|
183 |
# Input fields
|
184 |
past_conversation = gr.Markdown()
|
185 |
text_input = gr.Textbox(placeholder="Enter a statement", show_label=False)
|
186 |
-
select_response = gr.Radio(choices=[None, None], visible=False, label="Choose the
|
187 |
select_response_button = gr.Button("Select Response", visible=False)
|
188 |
with gr.Column() as example_submit:
|
189 |
submit_ex_button = gr.Button("Submit")
|
|
|
109 |
state_dict[f"response_{idx+1}"] = ""
|
110 |
state = gr.JSON(state_dict, visible=False)
|
111 |
|
112 |
+
gr.Markdown("# Talk to the assistant")
|
|
|
113 |
|
114 |
state_display = gr.Markdown(f"Your messages: 0/{TOTAL_CNT}")
|
115 |
|
|
|
136 |
state["data"].append(metadata)
|
137 |
state["past_user_inputs"].append(txt)
|
138 |
|
139 |
+
past_conversation_string = "<br />".join(["<br />".join(["Human π: " + user_input, "Assistant π€: " + model_response]) for user_input, model_response in zip(state["past_user_inputs"], state["generated_responses"] + [""])])
|
140 |
return gr.update(visible=False), gr.update(visible=True), gr.update(visible=True, choices=responses, interactive=True, value=responses[0]), gr.update(value=past_conversation_string), state, gr.update(visible=False), gr.update(visible=False), gr.update(visible=False), new_state_md, dummy
|
141 |
|
142 |
def _select_response(selected_response, state, dummy):
|
|
|
182 |
# Input fields
|
183 |
past_conversation = gr.Markdown()
|
184 |
text_input = gr.Textbox(placeholder="Enter a statement", show_label=False)
|
185 |
+
select_response = gr.Radio(choices=[None, None], visible=False, label="Choose the most helpful and honest response")
|
186 |
select_response_button = gr.Button("Select Response", visible=False)
|
187 |
with gr.Column() as example_submit:
|
188 |
submit_ex_button = gr.Button("Submit")
|