Commit
·
9c2faa8
1
Parent(s):
c338f6a
Update app.py
Browse files
app.py
CHANGED
@@ -49,6 +49,7 @@ def process_categories(categories,verbose=False):
|
|
49 |
return df_category_list
|
50 |
|
51 |
def compare_text(transcript, categories, threshold):
|
|
|
52 |
# Sentences
|
53 |
sentences = transcript_to_sentences(transcript)
|
54 |
embeddings = model.encode(sentences, convert_to_tensor=True)
|
@@ -109,7 +110,7 @@ Who=everyone is having conversations;if you're an entry-level person;If you’re
|
|
109 |
Impact=customer experience;communicating with the customer;spending time;spending a lot of time communicating;With other members of your team;internal communication and external communication;we want to make you remarkably better;we want to make you extraordinary at that behavior;meant to be learned along the way;No one at work can stop you for six months, 12 months, 18 months helping you become exceptional;your leadership journey;this is the most important skill right now for you;they don't have the time and they don't know how to do it;we can provide intentional guidance;deliver that on a personal basis for every single member of your organization that faces the customer;30% better at connecting with other people;measured by evidence-based research;the impact that that could have on individual performance;your individual growth as a leader;collective performance of the teams in the organization;make you be perceived as trustworthy, authentic, credible;improve how you connect
|
110 |
Bye=Bye;And I look forward to talking to you again soon. Thank you very much"""
|
111 |
|
112 |
-
threshold_default =
|
113 |
|
114 |
with gr.Blocks(css=".gradio-container { background-color: white; background-image: url('file=./qc-logo.png'); background-size: 75px 75px; background-repeat: no-repeat; background-position: 0px 0px; }") as demo:
|
115 |
gr.Markdown(f"# {' ' * 8}Transcript to BERT paraphrase-distilroberta-base-v2")
|
@@ -118,7 +119,7 @@ with gr.Blocks(css=".gradio-container { background-color: white; background-imag
|
|
118 |
with gr.Row():
|
119 |
target = gr.Textbox(lines=3, label="Categories", placeholder="Target categories")
|
120 |
with gr.Row():
|
121 |
-
threshold = gr.Slider(0, 100, threshold_default
|
122 |
btn = gr.Button(value="Compare!", variant="primary")
|
123 |
with gr.Row():
|
124 |
label = gr.Label()
|
|
|
49 |
return df_category_list
|
50 |
|
51 |
def compare_text(transcript, categories, threshold):
|
52 |
+
threshold = threshold / 100
|
53 |
# Sentences
|
54 |
sentences = transcript_to_sentences(transcript)
|
55 |
embeddings = model.encode(sentences, convert_to_tensor=True)
|
|
|
110 |
Impact=customer experience;communicating with the customer;spending time;spending a lot of time communicating;With other members of your team;internal communication and external communication;we want to make you remarkably better;we want to make you extraordinary at that behavior;meant to be learned along the way;No one at work can stop you for six months, 12 months, 18 months helping you become exceptional;your leadership journey;this is the most important skill right now for you;they don't have the time and they don't know how to do it;we can provide intentional guidance;deliver that on a personal basis for every single member of your organization that faces the customer;30% better at connecting with other people;measured by evidence-based research;the impact that that could have on individual performance;your individual growth as a leader;collective performance of the teams in the organization;make you be perceived as trustworthy, authentic, credible;improve how you connect
|
111 |
Bye=Bye;And I look forward to talking to you again soon. Thank you very much"""
|
112 |
|
113 |
+
threshold_default = 50
|
114 |
|
115 |
with gr.Blocks(css=".gradio-container { background-color: white; background-image: url('file=./qc-logo.png'); background-size: 75px 75px; background-repeat: no-repeat; background-position: 0px 0px; }") as demo:
|
116 |
gr.Markdown(f"# {' ' * 8}Transcript to BERT paraphrase-distilroberta-base-v2")
|
|
|
119 |
with gr.Row():
|
120 |
target = gr.Textbox(lines=3, label="Categories", placeholder="Target categories")
|
121 |
with gr.Row():
|
122 |
+
threshold = gr.Slider(0, 100, threshold_default)
|
123 |
btn = gr.Button(value="Compare!", variant="primary")
|
124 |
with gr.Row():
|
125 |
label = gr.Label()
|