Spaces:
Runtime error
Runtime error
File size: 481 Bytes
7b2e448 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import plotly.graph_objects as go
def spider_chart(classifier, text):
fig = go.Figure(data=go.Scatterpolar(
r=[round(s['score']*100,2) for s in classifier.predict(text)[0]],
theta= [l['label'] for l in classifier.predict(text)[0]],
fill='toself'))
fig.update_layout(
polar=dict(
radialaxis=dict(
visible=True
),
),
showlegend=False,
width = 400, height = 400,
title = "Audio Sentiment Analysis", title_x=0.5)
return fig |