aj2614@nyu.edu commited on
Commit
0cec39d
1 Parent(s): 47a68c5

try our luck with the button

Browse files
Files changed (1) hide show
  1. language_models_project/app.py +7 -7
language_models_project/app.py CHANGED
@@ -23,13 +23,13 @@ input_sentences = st.text_area("Sentences", value="", height=200)
23
 
24
  data = input_sentences.split('\n')
25
 
26
- #if st.button("Classify"):
27
- for i in data:
28
- st.write(i)
29
- j = classify(model_name.strip(), i)[0]
30
- sentiment = j['label']
31
- confidence = j['score']
32
- st.write(f"{i} :: Classification - {sentiment} with confidence {confidence}")
33
 
34
 
35
  st.markdown("Link to the app - [image-to-text-app on 🤗 Spaces](https://huggingface.co/spaces/Amrrs/image-to-text-app)")
 
23
 
24
  data = input_sentences.split('\n')
25
 
26
+ if st.button("Classify"):
27
+ for i in data:
28
+ st.write(i)
29
+ j = classify(model_name.strip(), i)[0]
30
+ sentiment = j['label']
31
+ confidence = j['score']
32
+ st.write(f"{i} :: Classification - {sentiment} with confidence {confidence}")
33
 
34
 
35
  st.markdown("Link to the app - [image-to-text-app on 🤗 Spaces](https://huggingface.co/spaces/Amrrs/image-to-text-app)")