hiba9 commited on
Commit
9e64540
·
verified ·
1 Parent(s): d5ce3e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -1
app.py CHANGED
@@ -1,8 +1,15 @@
1
  import os
2
  os.system('pip install transformers')
 
 
 
 
 
3
  import streamlit as st
4
  from transformers import pipeline
5
- pipe=pipeline("sentiment-analysis")
 
 
6
  text=st.text-area("enter some text")
7
  if text:
8
  out=pipe(text)
 
1
  import os
2
  os.system('pip install transformers')
3
+ import os
4
+ os.system('pip install torch')
5
+ import os
6
+ os.system('pip install tensorflow')
7
+
8
  import streamlit as st
9
  from transformers import pipeline
10
+
11
+ # Use PyTorch
12
+ pipe = pipeline("sentiment-analysis", framework="pt")
13
  text=st.text-area("enter some text")
14
  if text:
15
  out=pipe(text)