Nikhitha2310 commited on
Commit
37df66f
1 Parent(s): bc75a1f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -10
app.py CHANGED
@@ -1,12 +1,10 @@
1
  import os
2
  import streamlit as st
3
- import openai
4
- os.environ['OPENAI_API_KEY']=key
5
- response=openai.chat.completions.create(
6
- model="gpt-3.5-turbo",
7
- messages=[
8
- {"role": "system", "content": "Hello!, How can I assist you"},
9
- {'role':'user','content':"Tell me about India"}
10
- ]
11
- )
12
- st.write(response.choices[0].message.content)
 
1
  import os
2
  import streamlit as st
3
+
4
+ from transfomers import pipeline
5
+ inp=st.text_input("Enter the text")
6
+ btn=st.button("Submit")
7
+ pipe=pipeline(task='text_classification',model='cardiffnlp/twitter-roberta-base-sentiment-latest')
8
+
9
+ if(inp and btn):
10
+ st.write(pipe(text))