richardorama commited on
Commit
dbdc1d5
·
verified ·
1 Parent(s): e91d315

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -73,8 +73,8 @@ def summarize(txt):
73
  st.write(f"Text: {text}")
74
  st.write(f"Sentiment: {results[i]['label']}, Score: {results[i]['score']:.2f}\n")
75
  else:
76
- #st.write(f"Sentiment: {results['label']}, Score: {results['score']:.2f}\n")
77
- st.write(results)
78
 
79
  # Create a button and trigger the summarize function when clicked
80
  if st.sidebar.button('Summarize Sentiment'):
 
73
  st.write(f"Text: {text}")
74
  st.write(f"Sentiment: {results[i]['label']}, Score: {results[i]['score']:.2f}\n")
75
  else:
76
+ st.write(f"Text: {text}")
77
+ st.write(f"Sentiment: {results[0]['label']}, Score: {results[0]['score']:.2f}\n")
78
 
79
  # Create a button and trigger the summarize function when clicked
80
  if st.sidebar.button('Summarize Sentiment'):