Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ import re
|
|
7 |
logging.basicConfig(level=logging.ERROR)
|
8 |
logger = logging.getLogger(__name__)
|
9 |
|
10 |
-
OPENROUTER_API_KEY = "sk-or-v1-
|
11 |
YOUR_SITE_URL = "votre-site.com"
|
12 |
YOUR_APP_NAME = "MonChatbot"
|
13 |
|
@@ -319,7 +319,7 @@ def manage_conversation_flow(question, response, history):
|
|
319 |
if isinstance(analysis, dict) and "error" not in analysis:
|
320 |
current_question_index = len(history) // 2
|
321 |
|
322 |
-
if analysis["pertinence"] >=
|
323 |
if current_question_index < len(competence_questions) - 1:
|
324 |
return competence_questions[current_question_index + 1], None
|
325 |
else:
|
@@ -442,4 +442,4 @@ with gr.Blocks(theme=custom_theme) as demo:
|
|
442 |
submit_button.click(submit_and_compare, skill_assessment_output, comparison_output)
|
443 |
|
444 |
if __name__ == "__main__":
|
445 |
-
demo.launch()
|
|
|
7 |
logging.basicConfig(level=logging.ERROR)
|
8 |
logger = logging.getLogger(__name__)
|
9 |
|
10 |
+
OPENROUTER_API_KEY = "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"
|
11 |
YOUR_SITE_URL = "votre-site.com"
|
12 |
YOUR_APP_NAME = "MonChatbot"
|
13 |
|
|
|
319 |
if isinstance(analysis, dict) and "error" not in analysis:
|
320 |
current_question_index = len(history) // 2
|
321 |
|
322 |
+
if analysis["pertinence"] >= 70 or analysis["detail"] >= 70:
|
323 |
if current_question_index < len(competence_questions) - 1:
|
324 |
return competence_questions[current_question_index + 1], None
|
325 |
else:
|
|
|
442 |
submit_button.click(submit_and_compare, skill_assessment_output, comparison_output)
|
443 |
|
444 |
if __name__ == "__main__":
|
445 |
+
demo.launch()
|