missravneetkaur commited on
Commit
9f9b7b4
·
verified ·
1 Parent(s): 9d4dd42

Upload 7 files

Browse files
Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use official Python image
2
+ FROM python:3.10-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Copy project files
8
+ COPY . /app
9
+
10
+ # Install dependencies
11
+ RUN pip install --upgrade pip
12
+ RUN pip install -r requirements.txt
13
+
14
+ # Expose port 7860 (Hugging Face runs on this)
15
+ EXPOSE 7860
16
+
17
+ # Command to run your app
18
+ CMD ["python", "app.py"]
app.py ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from flask import Flask, render_template, request
2
+ import joblib
3
+ import os
4
+
5
+ app = Flask(__name__)
6
+
7
+ # Load models
8
+ tfidf_vectorizer = joblib.load("model/tfidf_vectorizer.pkl")
9
+ classifier = joblib.load("model/resume_classifier.pkl")
10
+
11
+ @app.route("/", methods=["GET", "POST"])
12
+ def home():
13
+ prediction = None
14
+ if request.method == "POST":
15
+ resume_text = request.form["resume"]
16
+ vectorized = tfidf_vectorizer.transform([resume_text])
17
+ prediction = classifier.predict(vectorized)[0]
18
+ return render_template("index.html", prediction=prediction)
19
+
20
+ if __name__ == "__main__":
21
+ app.run(host="0.0.0.0", port=7860)
model/.gitignore ADDED
File without changes
model/resume_classifier.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:18c1a3c76533b101dd4957cc7f298193e71bc62022e63e3159fce64455718565
3
+ size 1203647
model/tfidf_vectorizer.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:adf8731a04beb2631164583d3ad5b56eaaadb7cc2905b386ccd7c50dfc14f387
3
+ size 111516
requirements.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ flask
2
+ scikit-learn
3
+ pandas
4
+ joblib
5
+ gunicorn
templates/index.html ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>ATS Resume Screening</title>
5
+ </head>
6
+ <body>
7
+ <h2>ATS Resume Screening System</h2>
8
+ <form method="post">
9
+ <textarea name="resume" rows="10" cols="60" placeholder="Paste resume here"></textarea><br><br>
10
+ <button type="submit">Predict Job Category</button>
11
+ </form>
12
+
13
+ {% if prediction %}
14
+ <h3>Predicted Category: {{ prediction }}</h3>
15
+ {% endif %}
16
+ </body>
17
+ </html>