JobCy / app.py
yudistira-48sputra's picture
Create app.py
a47fdba verified
raw
history blame contribute delete
998 Bytes
import streamlit as st
import spacy
# Load the custom spaCy model
nlp = spacy.load("en_pipeline")
def extract_skills(text):
# Process the text with the loaded spaCy model
doc = nlp(text)
skills = []
for ent in doc.ents:
if ent.label_ == "SKILL": # Ganti dengan label yang sesuai jika berbeda
skills.append(ent.text)
return skills
# Streamlit UI
st.title("Ekstraksi Keterampilan dari Deskripsi Pekerjaan")
# Input deskripsi pekerjaan
job_description = st.text_area("Masukkan Deskripsi Pekerjaan", "")
if st.button("Ekstrak Keterampilan"):
if job_description:
# Ekstrak keterampilan menggunakan model NER
skills = extract_skills(job_description)
if skills:
st.write("Keterampilan yang diekstrak:")
for skill in skills:
st.write(f"- {skill}")
else:
st.write("Tidak ada keterampilan yang ditemukan.")
else:
st.write("Silakan masukkan deskripsi pekerjaan.")