Spaces:
Runtime error
Runtime error
changes made to app.py
Browse files
app.py
CHANGED
|
@@ -199,7 +199,17 @@ def end_interview(state):
|
|
| 199 |
return state["conversation"], state
|
| 200 |
|
| 201 |
def clear_state():
|
| 202 |
-
return [],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 203 |
|
| 204 |
# ===============================
|
| 205 |
# Gradio UI
|
|
@@ -233,6 +243,6 @@ with gr.Blocks() as demo:
|
|
| 233 |
outputs=[chatbot, state])
|
| 234 |
submit_button.click(submit_response, inputs=[response_input, state], outputs=[chatbot, state]).then(lambda: "", None, response_input)
|
| 235 |
exit_button.click(end_interview, inputs=state, outputs=[chatbot, state])
|
| 236 |
-
clear_button.click(
|
| 237 |
|
| 238 |
-
demo.launch()
|
|
|
|
| 199 |
return state["conversation"], state
|
| 200 |
|
| 201 |
def clear_state():
|
| 202 |
+
return [], {
|
| 203 |
+
"name": "",
|
| 204 |
+
"domain": "",
|
| 205 |
+
"company": "",
|
| 206 |
+
"level": "",
|
| 207 |
+
"asked_questions": set(),
|
| 208 |
+
"asked_subtopics": set(),
|
| 209 |
+
"conversation": [],
|
| 210 |
+
"evaluations": [],
|
| 211 |
+
"interview_active": False
|
| 212 |
+
}
|
| 213 |
|
| 214 |
# ===============================
|
| 215 |
# Gradio UI
|
|
|
|
| 243 |
outputs=[chatbot, state])
|
| 244 |
submit_button.click(submit_response, inputs=[response_input, state], outputs=[chatbot, state]).then(lambda: "", None, response_input)
|
| 245 |
exit_button.click(end_interview, inputs=state, outputs=[chatbot, state])
|
| 246 |
+
clear_button.click(clear_state, outputs=[chatbot, state])
|
| 247 |
|
| 248 |
+
demo.launch(ssr=False)
|