Spaces:
Sleeping
Sleeping
File size: 735 Bytes
b4d88a5 e1730a7 b4d88a5 79d8ee8 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
import pickle
import re
# import os
# os.environ.setdefault("STREAMLIT_CONFIG_DIR", ".streamlit")
# os.makedirs(os.environ["STREAMLIT_CONFIG_DIR"], exist_ok=True)
# os.environ["STREAMLIT_BROWSER_GATHER_USAGE_STATS"] = "false"
import streamlit as st
st.title("Resume Classifer")
uploaded_file = st.file_uploader("Upload your resume (.txt)", type=['txt'])
if uploaded_file:
resume_text = uploaded_file.read().decode('utf-8')
with open("model.pkl","rb") as f:
vectorizer, model = pickle.load(f)
text = re.sub(r'[^a-zA-Z ]', '', resume_text).lower()
features = vectorizer.transform([text])
prediction = model.predict(features)
st.write(f"### Predicted Job Role: `{prediction[0]}`") |