Update app.py
Browse files
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 |
-
|
|
|
|
|
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)
|