Spaces:
Sleeping
Sleeping
karthickg12
commited on
Commit
•
eed818f
1
Parent(s):
d154499
Update app.py
Browse files
app.py
CHANGED
@@ -1,19 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
import streamlit as st
|
2 |
-
from transformers import pipeline
|
3 |
-
summarizer = pipeline("summarization")
|
4 |
-
# pipe=pipeline("sentiment-analysis")
|
5 |
-
# col1, col2 = st.columns(2)
|
6 |
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
#
|
|
|
11 |
|
12 |
-
|
13 |
-
# t=st.text_input("Enter the Text")
|
14 |
-
# st.write(pipe(t))
|
15 |
-
# if y:
|
16 |
-
t1=st.text_input("Enter the Text for Summarization")
|
17 |
-
st.write(summarizer(t1))
|
18 |
|
19 |
-
|
|
|
|
1 |
+
# import streamlit as st
|
2 |
+
# from transformers import pipeline
|
3 |
+
# summarizer = pipeline("summarization")
|
4 |
+
# # pipe=pipeline("sentiment-analysis")
|
5 |
+
# # col1, col2 = st.columns(2)
|
6 |
+
|
7 |
+
# # with col1:
|
8 |
+
# # x=st.button("Sentiment Analysis")
|
9 |
+
# # with col2:
|
10 |
+
# # y=st.button("Text Summarization")
|
11 |
+
|
12 |
+
# # if x:
|
13 |
+
# # t=st.text_input("Enter the Text")
|
14 |
+
# # st.write(pipe(t))
|
15 |
+
# # if y:
|
16 |
+
# t1=st.text_input("Enter the Text for Summarization")
|
17 |
+
# st.write(summarizer(t1))
|
18 |
+
|
19 |
+
from transformers import AutoTokenizer, AutoModel
|
20 |
import streamlit as st
|
|
|
|
|
|
|
|
|
21 |
|
22 |
+
tokenizer = AutoTokenizer.from_pretrained("llmware/industry-bert-insurance-v0.1")
|
23 |
+
|
24 |
+
model = AutoModel.from_pretrained("llmware/industry-bert-insurance-v0.1")
|
25 |
+
# Use a pipeline as a high-level helper
|
26 |
+
from transformers import pipeline
|
27 |
|
28 |
+
pipe = pipeline("feature-extraction", model="llmware/industry-bert-insurance-v0.1")
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
+
t=st.text_input("Enter the Text")
|
31 |
+
st.write(pipe(t))
|