Spaces:
Sleeping
Sleeping
File size: 700 Bytes
ff9adfe |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
import streamlit as st
from transformers import pipeline
# Load Hugging Face classifier
classifier = pipeline("zero-shot-classification")
st.title("Fake Job Posting Detector")
# Input job description
job_description = st.text_area("Enter the job description:")
if st.button("Check Job"):
if job_description.strip() == "":
st.warning("Please enter a job description.")
else:
labels = ["Legit", "Fake"]
result = classifier(job_description, candidate_labels=labels)
predicted_label = result['labels'][0]
confidence = result['scores'][0]
st.write(f"Prediction: **{predicted_label}**")
st.write(f"Confidence: {confidence:.2f}")
|