import streamlit as st import fitz # PyMuPDF from huggingface_hub import hf_hub_download st.title("Ruthvik's Intro") # Sidebar navigation st.sidebar.title("Navigation") sections = ["Profile Summary", "Functional Skills", "Technical Skills", "Work Experience", "Education", "Research and Publications", "Certifications"] for section in sections: st.sidebar.markdown(f"[{section}](#{section.lower().replace(' ', '-')})") # Replace with your Hugging Face repository details repo_id = "ruthvik7382/resume" file_path_in_repo = "Ruthvik-Resume.pdf" # Download the PDF file from the Hugging Face repository pdf_path = hf_hub_download(repo_id=repo_id, filename=file_path_in_repo) # Display PDF in Streamlit with open(pdf_path, 'rb') as file: pdf_data = file.read() st.subheader("Uploaded Resume") st.download_button(label="Download Resume", data=pdf_data, file_name="resume.pdf") # Read and display the PDF content doc = fitz.open(pdf_path) text = "" for page_num in range(len(doc)): page = doc.load_page(page_num) text += page.get_text() # Function to create HTML anchors for each section def create_anchor(section_name): anchor = f"