LilRg commited on
Commit
7b66d37
·
verified ·
1 Parent(s): f7f7f95

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
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 = "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"
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"] >= 40 or analysis["detail"] >= 40:
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()