Hugging Face
Models
Datasets
Spaces
Buckets
new
Docs
Enterprise
Pricing
Website
Tasks
HuggingChat
Collections
Languages
Organizations
Community
Blog
Posts
Daily Papers
Learn
Discord
Forum
GitHub
Solutions
Team & Enterprise
Hugging Face PRO
Enterprise Support
Inference Providers
Inference Endpoints
Storage Buckets
Log In
Sign Up
Spaces:
yekkala
/
cx-agent
like
0
Sleeping
App
Files
Files
Community
Fetching metadata from the HF Docker repository...
e7a19dd
cx-agent
/
utils
/
scoring.py
yekkala
Create utils/scoring.py
1117b7b
verified
5 months ago
raw
Copy download link
history
blame
Safe
206 Bytes
def
confidence_score
(
intent, sentiment
):
score =
70
if
sentiment ==
"NEGATIVE"
:
score -=
20
if
intent
in
[
"Support"
,
"Complaint"
]:
score +=
10
return
max
(
0
,
min
(
100
, score))