Frenchizer commited on
Commit
1957c1c
·
verified ·
1 Parent(s): 36fdde1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -77,7 +77,7 @@ def detect_context(input_text, threshold=0.03):
77
  label_probabilities = list(zip(labels, probabilities))
78
 
79
  # Filter contexts with confidence >= threshold
80
- high_confidence_contexts = [(label, score) for label, scores in label_probabilities if score >= threshold]
81
 
82
  # If no contexts meet the threshold, default to "general"
83
  if not high_confidence_contexts:
 
77
  label_probabilities = list(zip(labels, probabilities))
78
 
79
  # Filter contexts with confidence >= threshold
80
+ high_confidence_contexts = [(label, score) for label, score in label_probabilities if score >= threshold]
81
 
82
  # If no contexts meet the threshold, default to "general"
83
  if not high_confidence_contexts: