ayethuzar commited on
Commit
a4cdb08
1 Parent(s): 9787b63

Update app.py with the prefilled text in the form

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -2,10 +2,8 @@ import streamlit as st
2
  from transformers import pipeline
3
 
4
  st.title('Sentiment Analysis using Transformers pipeline function')
5
- st.write('References:')
6
- st.write('1. https://medium.com/@rtkilian/deploy-and-share-your-sentiment-analysis-app-using-streamlit-sharing-2ba3ca6a3ead')
7
- st.write('2. https://huggingface.co/learn/nlp-course/chapter1/3?fw=pt')
8
 
 
9
  form = st.form(key='sentiment-form')
10
  user_input = form.text_area(label = 'Enter your text', value = "I love steamlit and hugging face!")
11
  submit = form.form_submit_button('Submit')
@@ -20,3 +18,10 @@ if submit:
20
  st.success(f'{label} sentiment (score: {score})')
21
  else:
22
  st.error(f'{label} sentiment (score: {score})')
 
 
 
 
 
 
 
 
2
  from transformers import pipeline
3
 
4
  st.title('Sentiment Analysis using Transformers pipeline function')
 
 
 
5
 
6
+ # steamlit form
7
  form = st.form(key='sentiment-form')
8
  user_input = form.text_area(label = 'Enter your text', value = "I love steamlit and hugging face!")
9
  submit = form.form_submit_button('Submit')
 
18
  st.success(f'{label} sentiment (score: {score})')
19
  else:
20
  st.error(f'{label} sentiment (score: {score})')
21
+
22
+
23
+
24
+ st.write('References:')
25
+ st.write('1. https://medium.com/@rtkilian/deploy-and-share-your-sentiment-analysis-app-using-streamlit-sharing-2ba3ca6a3ead')
26
+ st.write('2. https://huggingface.co/learn/nlp-course/chapter1/3?fw=pt')
27
+ st.write('3. https://docs.streamlit.io/library/api-reference/widgets/st.text_input')