File size: 1,191 Bytes
4b4c7de 12c061a 8f4c0bb 25bed32 4b4c7de 25bed32 12c061a 4b4c7de 25bed32 4b4c7de 12c061a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# import streamlit as st
# from transformers import pipeline
# # Load NER model
# ner_model = pipeline("ner", model="has-abi/distilBERT-finetuned-resumes-sections")
# # Create Streamlit app
# st.title("Named Entity Recognition with Hugging Face models")
# # Get user input
# text_input = st.text_input("Enter some text:")
# # Run NER on user input
# if text_input:
# results = ner_model(text_input)
# for result in results:
# st.write(f"{result['word']}: {result['entity']}")
import streamlit as st
from transformers import pipeline
# Set up Resuméner pipeline
summarizer = pipeline("summarization", model="sshleifer/distilbart-cnn-6-6")
# Create Streamlit app
st.title("Resuméner")
st.write("Upload your resume below to generate a summary.")
# Upload resume file
uploaded_file = st.file_uploader("Choose a file")
if uploaded_file is not None:
# Read resume file contents
resume_text = uploaded_file.read().decode("utf-8")
# Generate summary using Resuméner pipeline
summary = summarizer(resume_text, max_length=100, min_length=30, do_sample=False)[0]['summary_text']
# Display summary
st.write("Summary:")
st.write(summary)
|