abhisheky127 commited on
Commit
5028fb3
1 Parent(s): 4295b9f

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +33 -0
app.py ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ from transformers import pipeline
3
+ from PIL import Image
4
+
5
+ model_path = "abhisheky127/FeedbackSummarizerEnterpret"
6
+
7
+ summarizer = pipeline("summarization", model=model_path)
8
+
9
+ st.title("Feedback Summarizer: Enterpret")
10
+ st.markdown(
11
+ """
12
+ #### Summarize reviews/feedbacks with fine-tuned T5-small language Model
13
+ > *powered by Hugging Face T5, Streamlit*
14
+ ----
15
+ """
16
+ )
17
+
18
+ text = "<product>zoom</product><type>Appstore/Playstore</type><text>user: this is very successful meeting business</text>"
19
+ pred = summarizer(text)
20
+ pred
21
+
22
+ # file_name = st.file_uploader("Upload a hot dog candidate image")
23
+
24
+ # if file_name is not None:
25
+ # col1, col2 = st.columns(2)
26
+
27
+ # image = Image.open(file_name)
28
+ # col1.image(image, use_column_width=True)
29
+ # predictions = pipeline(image)
30
+
31
+ # col2.header("Probabilities")
32
+ # for p in predictions:
33
+ # col2.subheader(f"{ p['label'] }: { round(p['score'] * 100, 1)}%")