Spaces:
Build error
Build error
Commit ·
e2058e2
1
Parent(s): 1bf74ad
add autheentication and change end token.
Browse files
app.py
CHANGED
|
@@ -186,11 +186,11 @@ def log_interaction(
|
|
| 186 |
def interview_end_check(
|
| 187 |
chat_history: list[list[str | None]],
|
| 188 |
limit: int = 20,
|
| 189 |
-
end_of_interview: str = "<
|
| 190 |
) -> tuple[list[list[str | None]], gr.Button]:
|
| 191 |
"""
|
| 192 |
Checks if interview has completed using two conditions:
|
| 193 |
-
1. If the last bot message contains `end_of_interview` (default: "<end_interview>")
|
| 194 |
2. Conversation length has reached `limit` (default: 10)
|
| 195 |
|
| 196 |
If either condition is met, the end of interview button is displayed.
|
|
@@ -370,4 +370,4 @@ with gr.Blocks(theme="sudeepshouche/minimalist") as demo:
|
|
| 370 |
|
| 371 |
|
| 372 |
if __name__ == "__main__":
|
| 373 |
-
demo.launch(
|
|
|
|
| 186 |
def interview_end_check(
|
| 187 |
chat_history: list[list[str | None]],
|
| 188 |
limit: int = 20,
|
| 189 |
+
end_of_interview: str = "<end_of_survey>",
|
| 190 |
) -> tuple[list[list[str | None]], gr.Button]:
|
| 191 |
"""
|
| 192 |
Checks if interview has completed using two conditions:
|
| 193 |
+
1. If the last bot message contains `end_of_interview` (default: "<end_of_survey>". Replaced "<end_interview>" with this new default token by Kentaro)
|
| 194 |
2. Conversation length has reached `limit` (default: 10)
|
| 195 |
|
| 196 |
If either condition is met, the end of interview button is displayed.
|
|
|
|
| 370 |
|
| 371 |
|
| 372 |
if __name__ == "__main__":
|
| 373 |
+
demo.launch(auth = ("admin", "cognitive"))
|