Spaces:
Sleeping
Sleeping
Model Uploded
Browse files
app.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import streamlit as st
|
| 2 |
+
import pickle
|
| 3 |
+
import re
|
| 4 |
+
|
| 5 |
+
st.title("Resume Classifer")
|
| 6 |
+
|
| 7 |
+
uploaded_file = st.file_uploader("Upload your resume (.txt)", type=['txt'])
|
| 8 |
+
|
| 9 |
+
if uploaded_file:
|
| 10 |
+
resume_text = uploaded_file.read().decode('utf-8')
|
| 11 |
+
|
| 12 |
+
with open("model.pkl","rb") as f:
|
| 13 |
+
vectorizer, model = pickle.load(f)
|
| 14 |
+
|
| 15 |
+
text = re.sub(r'[^a-zA-Z ]', '', resume_text).lower()
|
| 16 |
+
features = vectorizer.transform([text])
|
| 17 |
+
prediction = model.predict(features)
|
| 18 |
+
|
| 19 |
+
st.write(f"### Predicted Job Role: `{prediction[0]}`")
|
model.pkl
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0bba85df05d08d16cbc7a84b9cd25d1368bd7e0a69caa7f219721ef3fac1d327
|
| 3 |
+
size 714470
|