Commit
·
9132037
1
Parent(s):
99f44f0
Update app.py
Browse files
app.py
CHANGED
@@ -76,8 +76,9 @@ def compare_text(transcript, categories, threshold):
|
|
76 |
'similarity': score
|
77 |
}
|
78 |
df_results = df_results.append(new_row, ignore_index=True)
|
79 |
-
|
80 |
-
|
|
|
81 |
|
82 |
df_summary = pd.DataFrame(df_cosines.max(numeric_only=True),columns=['similarity'])
|
83 |
df_summary['ok'] = np.where(df_summary['similarity'] > threshold, True, False)
|
@@ -102,9 +103,7 @@ def compare_text(transcript, categories, threshold):
|
|
102 |
df_results = df_results.round(decimals = 3)
|
103 |
df_summary = df_summary['similarity'].round(decimals = 2)
|
104 |
|
105 |
-
|
106 |
-
|
107 |
-
return df_summary.to_dict(), fig, df_results, df_by_line
|
108 |
|
109 |
categories = """Hello=Hello, how are you doing today?;Hi, everybody;Hi;My name's Johnny
|
110 |
What=most advanced conversation intelligence and AI powered coaching platform;a software platform that helps people reach their potential;for communicating and connecting;empowered by behavioral science;uses artificial intelligence;drives performance outcomes for customer facing teams;help them sell more;help them deliver better experiences
|
|
|
76 |
'similarity': score
|
77 |
}
|
78 |
df_results = df_results.append(new_row, ignore_index=True)
|
79 |
+
|
80 |
+
df_by_line = df_cosines.round(decimals = 3)
|
81 |
+
df_results = df_results.sort_values(['line','similarity'],ascending=[True,False]).round(decimals = 3)
|
82 |
|
83 |
df_summary = pd.DataFrame(df_cosines.max(numeric_only=True),columns=['similarity'])
|
84 |
df_summary['ok'] = np.where(df_summary['similarity'] > threshold, True, False)
|
|
|
103 |
df_results = df_results.round(decimals = 3)
|
104 |
df_summary = df_summary['similarity'].round(decimals = 2)
|
105 |
|
106 |
+
return df_summary.to_dict(), fig, df_by_line, df_results
|
|
|
|
|
107 |
|
108 |
categories = """Hello=Hello, how are you doing today?;Hi, everybody;Hi;My name's Johnny
|
109 |
What=most advanced conversation intelligence and AI powered coaching platform;a software platform that helps people reach their potential;for communicating and connecting;empowered by behavioral science;uses artificial intelligence;drives performance outcomes for customer facing teams;help them sell more;help them deliver better experiences
|