Commit cec8f555 authored by Russell Jarvis's avatar Russell Jarvis 💬
Browse files

update for web app

parent 2f74b525
Pipeline #1596 failed with stages
in 4 minutes and 35 seconds
......@@ -613,31 +613,31 @@ def main():
np.mean(average_reading_time), author_name, len(ar)
)
)
if "sentiment" in genre:
sentiment = []
uniqueness = []
for block in trainingDats:
uniqueness.append(block["uniqueness"])
sentiment.append(block["sp"])
temp = np.mean(sentiment) < np.mean([r["sp"] for r in ar])
st.markdown("""### Sentiment""")
st.markdown(
"""It is {} that the mean sentiment of {}'s writing is more postive relative to that of Readability of the ART Corpus.
""".format(
temp, author_name
)
)
#if "sentiment" in genre:
# sentiment = []
# uniqueness = []
# for block in trainingDats:
# uniqueness.append(block["uniqueness"])
# sentiment.append(block["sp"])
# temp = np.mean(sentiment) < np.mean([r["sp"] for r in ar])
# st.markdown("""### Sentiment""")
# st.markdown(
# """It is {} that the mean sentiment of {}'s writing is more postive relative to that of Readability of the ART Corpus.
# """.format(
# temp, author_name
# )
# )
temp = "{0} positive sentiment".format(author_name)
labels = [temp, "ART Corpus positive sentiment"]
values = [np.mean([r["sp"] for r in ar]), np.mean(sentiment)]
# temp = "{0} positive sentiment".format(author_name)
# labels = [temp, "ART Corpus positive sentiment"]
# values = [np.mean([r["sp"] for r in ar]), np.mean(sentiment)]
# urlDat["reading_time"]
fig = go.Figure(data=[go.Pie(labels=labels, values=values, hole=0.3)])
st.write(fig)
# fig = go.Figure(data=[go.Pie(labels=labels, values=values, hole=0.3)])
# st.write(fig)
st.markdown("\n")
# st.markdown("\n")
if __name__ == "__main__":
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment