Updated basic summarization task
Browse files- app.py +17 -0
- requirements.txt +0 -0
app.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# streamlit app
|
| 2 |
+
|
| 3 |
+
import streamlit as st
|
| 4 |
+
# Use a pipeline as a high-level helper
|
| 5 |
+
from transformers import pipeline
|
| 6 |
+
|
| 7 |
+
pipe = pipeline("summarization", model="facebook/bart-large-cnn")
|
| 8 |
+
|
| 9 |
+
st.header('Profiler App')
|
| 10 |
+
input = st.text_area("Enter proile information", height=100)
|
| 11 |
+
|
| 12 |
+
submit = st.button("Submit")
|
| 13 |
+
|
| 14 |
+
if submit:
|
| 15 |
+
st.subheader('Candidate Summary')
|
| 16 |
+
summary = pipe(input)
|
| 17 |
+
st.write(summary[0]['summary_text'])
|
requirements.txt
ADDED
|
File without changes
|