Infinity-1995's picture
Create app.py
ff9adfe verified
raw
history blame
700 Bytes
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}")