Logeswaransr commited on
Commit
1f1b415
1 Parent(s): ef8f543

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -1
app.py CHANGED
@@ -6,6 +6,9 @@ Created on Thu Sep 21 22:17:43 2023
6
  """
7
 
8
  import streamlit as st
 
 
 
9
 
10
  st.set_page_config(page_title='Sample Chatbot', layout='wide')
11
 
@@ -27,8 +30,10 @@ if prompt:=st.chat_input("What is up!"):
27
  st.session_state.messages.append({
28
  'role':'user',
29
  'content': prompt})
 
 
30
 
31
- response = f"Echo: {prompt}"
32
 
33
  with st.chat_message("assistant"):
34
  st.markdown(response)
 
6
  """
7
 
8
  import streamlit as st
9
+ from transformers import pipeline
10
+
11
+ pipe=pipeline('sentiment-analysis')
12
 
13
  st.set_page_config(page_title='Sample Chatbot', layout='wide')
14
 
 
30
  st.session_state.messages.append({
31
  'role':'user',
32
  'content': prompt})
33
+
34
+ out=pipe(prompt)
35
 
36
+ response = f"Echo: {prompt}\nAnalysis: {out}"
37
 
38
  with st.chat_message("assistant"):
39
  st.markdown(response)