Dazzler007 commited on
Commit
e1a6a08
·
verified ·
1 Parent(s): e43d57f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -2
app.py CHANGED
@@ -5,9 +5,22 @@ from transformers import pipeline, AutoConfig
5
  pipe = pipeline('sentiment-analysis')
6
 
7
  # App Title
8
- st.title("AI in Marketing | AI Driven | Text to Sentiment Analysis App | by Darren Field")
9
  #st.text("Enter your text and click the 'Analyze Sentiment' button to submit.")
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  # Get the model name
12
  model_name = pipe.model.name_or_path
13
 
@@ -15,7 +28,7 @@ model_name = pipe.model.name_or_path
15
  config = AutoConfig.from_pretrained(model_name)
16
 
17
  # Text input area
18
- text = st.text_area('Enter text including your sentiment.')
19
 
20
  # Submit button
21
  if st.button('Analyze Sentiment'):
 
5
  pipe = pipeline('sentiment-analysis')
6
 
7
  # App Title
8
+ st.title("Text to Sentiment")
9
  #st.text("Enter your text and click the 'Analyze Sentiment' button to submit.")
10
 
11
+ # Display final score and quiz progress
12
+ st.sidebar.write("About")
13
+ st.sidebar.write(f"Sentiment Detector is a text to Sentiment Analysis app by Darren Field.")
14
+ st.sidebar.write(f"Examples:")
15
+ st.sidebar.write(f"The fish in the restaurant was not fresh")
16
+ st.sidebar.write(f"The fish in the restaurant was very fresh")
17
+ st.sidebar.write(f"The product's design feels cheap and lacks durability")
18
+ st.sidebar.write(f"The product's design feels expensive and durable")
19
+ st.sidebar.write(f"Customer service has been unresponsive, making it difficult to resolve issues.")
20
+ st.sidebar.write(f"Customer service has been fast, making it easy to resolve issues.")
21
+ st.sidebar.write(f"This simple app leverages AI to detect positive and negative sentiment in text. The text is scored and classified as either Positive or Negative sentiment.")
22
+ st.sidebar.write(f"The concept can be extended or modifed to solve many requirements.")
23
+
24
  # Get the model name
25
  model_name = pipe.model.name_or_path
26
 
 
28
  config = AutoConfig.from_pretrained(model_name)
29
 
30
  # Text input area
31
+ text = st.text_area('Enter text including your sentiment. Postitive sentiments will be rewared with balloons')
32
 
33
  # Submit button
34
  if st.button('Analyze Sentiment'):