Spaces:
Sleeping
Sleeping
| from transformers import pipeline | |
| # Load Hugging Face zero-shot classifier | |
| classifier = pipeline("zero-shot-classification") | |
| # Example job description (you can change this) | |
| job_description = """ | |
| Urgent hiring! Work from home, no experience needed, $5000/month! | |
| """ | |
| # Define candidate labels | |
| labels = ["Legit", "Fake"] | |
| # Run classification | |
| result = classifier(job_description, candidate_labels=labels) | |
| # Extract prediction | |
| predicted_label = result['labels'][0] | |
| confidence = result['scores'][0] | |
| # Print the result | |
| print("Job Description:") | |
| print(job_description) | |
| print("\nPrediction:", predicted_label) | |
| print(f"Confidence: {confidence:.2f}") | |