Commit
·
c4fc0c5
1
Parent(s):
37dc98f
Update app.py
Browse files
app.py
CHANGED
@@ -99,10 +99,9 @@ def compare_text(transcript, categories, threshold):
|
|
99 |
fig.update_traces(textfont_size=24, textangle=0, textposition="inside", cliponaxis=False)
|
100 |
fig.update_yaxes(range=[0, 1])
|
101 |
|
102 |
-
|
103 |
-
|
104 |
-
res
|
105 |
-
return res, fig, df_results.round(decimals = 3)
|
106 |
|
107 |
categories = """Hello=Hello, how are you doing today?;Hi, everybody;Hi;My name's Johnny
|
108 |
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
|
@@ -114,7 +113,7 @@ Bye=Bye;And I look forward to talking to you again soon. Thank you very much"""
|
|
114 |
threshold_default = 0.50
|
115 |
|
116 |
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:
|
117 |
-
gr.Markdown(f"# {' ' * 8}Transcript
|
118 |
with gr.Row():
|
119 |
source = gr.Textbox(lines=3, label="Transcript", placeholder="Source text")
|
120 |
with gr.Row():
|
|
|
99 |
fig.update_traces(textfont_size=24, textangle=0, textposition="inside", cliponaxis=False)
|
100 |
fig.update_yaxes(range=[0, 1])
|
101 |
|
102 |
+
df_results = df_results.round(decimals = 3) # .drop(labels='line',axis=1).groupby('tag').head(3).reset_index() .drop(labels='index',axis=1)
|
103 |
+
res = df_summary['similarity'].round(decimals = 2).to_dict()
|
104 |
+
return res, fig, df_results
|
|
|
105 |
|
106 |
categories = """Hello=Hello, how are you doing today?;Hi, everybody;Hi;My name's Johnny
|
107 |
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
|
|
|
113 |
threshold_default = 0.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")
|
117 |
with gr.Row():
|
118 |
source = gr.Textbox(lines=3, label="Transcript", placeholder="Source text")
|
119 |
with gr.Row():
|