Spaces:
Sleeping
Sleeping
File size: 1,143 Bytes
dbebc47 |
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 28 29 30 31 32 33 34 35 |
import streamlit as st
from assistant import chat_with_hf_bot
from resume_parser import extract_text_from_pdf
from skill_matcher import match_skills
from tracker import log_question
from database import init_db, save_chat
st.set_page_config(page_title="AI Career Coach", layout="wide")
init_db()
st.title("π AI Career Coach")
st.subheader("Chatbot + Resume Analysis + Weekly Guidance")
tab1, tab2 = st.tabs(["π¬ Chatbot", "π Resume Matcher"])
with tab1:
user_input = st.text_input("Ask career-related questions:")
if user_input:
response = chat_with_hf_bot(user_input)
save_chat(user_input, response)
log_question(user_input)
st.success(response)
with tab2:
uploaded_file = st.file_uploader("Upload your Resume (PDF only)", type="pdf")
if uploaded_file:
resume_text = extract_text_from_pdf(uploaded_file)
st.markdown("**Extracted Skills from Resume:**")
st.write(resume_text)
matched_roles = match_skills(resume_text)
st.markdown("**Suggested Roles based on Resume:**")
for role in matched_roles:
st.write(f"β
{role}")
|