Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -61,11 +61,6 @@ with gr.Blocks() as demo:
|
|
61 |
|
62 |
gr.Markdown("**Call Transcript:**")
|
63 |
diarized = gr.HighlightedText(label="Call Transcript")
|
64 |
-
gr.Markdown("Choose speaker to summarize:")
|
65 |
-
check = gr.CheckboxGroup(
|
66 |
-
choices=["Customer", "Support"], show_label=False, type="value"
|
67 |
-
)
|
68 |
-
summary = gr.Textbox(lines=4)
|
69 |
sentiment_btn = gr.Button("Get Customer Sentiment")
|
70 |
analyzed = gr.HighlightedText(color_map=color_map)
|
71 |
plot = gr.Plot(label="Sentiment over time", type="plotly")
|
@@ -85,8 +80,6 @@ with gr.Blocks() as demo:
|
|
85 |
inputs=audio,
|
86 |
outputs=diarized,
|
87 |
)
|
88 |
-
# when summarize checkboxes are changed, create summary
|
89 |
-
check.change(fn=partial(summarize, summarization_pipeline=summarization_pipeline), inputs=[diarized, check], outputs=summary)
|
90 |
|
91 |
# when sentiment button clicked, display highlighted text and plot
|
92 |
sentiment_btn.click(fn=partial(sentiment, emotion_pipeline=emotion_pipeline), inputs=diarized, outputs=[analyzed, plot])
|
|
|
61 |
|
62 |
gr.Markdown("**Call Transcript:**")
|
63 |
diarized = gr.HighlightedText(label="Call Transcript")
|
|
|
|
|
|
|
|
|
|
|
64 |
sentiment_btn = gr.Button("Get Customer Sentiment")
|
65 |
analyzed = gr.HighlightedText(color_map=color_map)
|
66 |
plot = gr.Plot(label="Sentiment over time", type="plotly")
|
|
|
80 |
inputs=audio,
|
81 |
outputs=diarized,
|
82 |
)
|
|
|
|
|
83 |
|
84 |
# when sentiment button clicked, display highlighted text and plot
|
85 |
sentiment_btn.click(fn=partial(sentiment, emotion_pipeline=emotion_pipeline), inputs=diarized, outputs=[analyzed, plot])
|