Infinity-1995 commited on
Commit
27fd6e0
·
verified ·
1 Parent(s): 01b7da2

Create Main.py

Browse files
Files changed (1) hide show
  1. Main.py +25 -0
Main.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+
3
+ # Load Hugging Face zero-shot classifier
4
+ classifier = pipeline("zero-shot-classification")
5
+
6
+ # Example job description (you can change this)
7
+ job_description = """
8
+ Urgent hiring! Work from home, no experience needed, $5000/month!
9
+ """
10
+
11
+ # Define candidate labels
12
+ labels = ["Legit", "Fake"]
13
+
14
+ # Run classification
15
+ result = classifier(job_description, candidate_labels=labels)
16
+
17
+ # Extract prediction
18
+ predicted_label = result['labels'][0]
19
+ confidence = result['scores'][0]
20
+
21
+ # Print the result
22
+ print("Job Description:")
23
+ print(job_description)
24
+ print("\nPrediction:", predicted_label)
25
+ print(f"Confidence: {confidence:.2f}")