Spaces:
Runtime error
Runtime error
added plotly_chart to frontend
Browse files123345676 unmodified lines141516161718192017181920222324252627282921import streamlit as stimport transformers as timport plotly.graph_objects as goimport plotly.express as pximport pandas as pd
st.title("Phrase Feeling Analysis")classifier = t.pipeline("zero-shot-classification",6 unmodified linesoutput = classifier(x, candidate_labels)st.write(str(output))
# fig = go.Figure(data=go.Scatterpolar(# r=[1, 5, 2, 2, 3],# theta=candidate_labels,# fill='toself'# ))df = pd.DataFrame(dict(r=output['scores'], theta=output['labels']))fig = px.line_polar(df, r='r', theta='theta', line_close=True)fig.update_traces(fill='toself')
# fig.update_layout(# polar=dict(# radialaxis=dict(# visible=True# ),# ),# showlegend=False# )st.plotly_chart(fig)app.py+6-14