Spaces:
Runtime error
Runtime error
import streamlit as st | |
from PIL import Image | |
from streamlit_lottie import st_lottie | |
import json | |
import os | |
import glob | |
from streamlit_option_menu import option_menu | |
from projects import display_projects | |
#setting layout to wide | |
st.set_page_config(layout="wide") | |
# Load CSS for styling with a minimalist grey background | |
with open("style.css") as f: | |
css_content = f.read() | |
css_content += ''' | |
body { | |
background-color: #f0f2f6; | |
} | |
''' | |
st.markdown('<style>{}</style>'.format(css_content), unsafe_allow_html=True) | |
def load_lottiefile(filepath: str): | |
with open(filepath, "r") as file: | |
return json.load(file) | |
def display_header(): | |
st.write(''' | |
# Nihar Palem | |
##### | |
''') | |
# Assuming you have a Lottie animation to display | |
lottie_animation = load_lottiefile("bio.json") | |
st_lottie(lottie_animation, height=300, key="header_animation") | |
def display_summary(): | |
#st.markdown('## Summary', unsafe_allow_html=True) | |
st.markdown("""Hello! This is Nihar Palem. I'm originally from Hyderabad and currently residing in the Silicon Valley Bay Area, San Jose. I'm a Graduate with Master's degree in Data Analytics (Applied Data Science) from San Jose State University. In this portfolio, you can explore my academic background, work experience, and projects in the data science field. You'll also find links to my skills, other hobbies, and certifications.""") | |
def display_education(): | |
st.markdown('## Education') | |
st.write(""" | |
- **Masters In Data Analytics**, *San Jose State University*, USA (2023-2024) | |
- Courses: Data Mining, Deep Learning, Big Data Technologies, Data Visualization, Machine Learning, Database Management Systems | |
- Achievements: | |
- A Grade in Deep Learning | |
- **Bachelor of Technology (B.Tech) in Electrical and Electronics Engineering (EEE)**, *Sreenidhi Institute of Science and Technology (SNIST)*, Hyderabad (2015-2019) | |
- Activities: | |
- Memeber of the Robotics Club:, built line follower and theft-alert detection bots. | |
- Member of the college cricket team; won the Hyderabad zone-level tournament | |
""") | |
def display_work_experience(): | |
st.markdown('## Work Experience') | |
st.write(""" | |
**Turing, San Jose, CA, USA** | |
March 2025 - Present | |
- **Data Scientist** | |
- Successfully shipped a custom evaluation-benchmark dataset for Gemini 3.0, aggregating data sources across multiple | |
domains (mathematics, finance, chemistry, biology) spanning educational levels from high-school through PhD | |
- Collaborate with AI engineers, product teams, and academic researchers to align research initiatives with business objectives and deliver data-driven solutions across cross-functional teams | |
- Fine-tuned Qwen model on multi-GPU cluster using advanced architecture, boosting overall performance by 12% and achieving significant accuracy improvements across 15+ analytical categories | |
- Design and implement robust evaluation pipelines incorporating quality assessments, performance benchmarking, and bias mitigation techniques to enhance model reliability and fairness | |
**San Jose State University, San Jose, CA, USA** | |
August 2024 - December 2024 | |
- **Teaching Assistant** | |
- Mentored 80+ graduate students on data modeling projects, providing feedback on technical documentation | |
- Reviewed and debugged student data pipelines, offering solutions for data analysis and ML model challenges | |
- Improved student performance, with 75% of mentored students achieving an 'A' grade | |
-Conducted weekly office hours to assist students with complex data science concepts and project implementations | |
**Bharat Electronics Limited, Hyderabad, India** | |
February 2021 - March 2022 | |
- **Data Analyst** | |
- Optimized SQL queries for sales and payroll databases using indexes and CTEs, reducing execution times by 40% | |
- Developed and maintained 20+ Tableau dashboards, reducing production costs by 15% and improving sales forecasts by 10% | |
- Implemented automated billing checks using SQL procedures, reducing financial discrepancies by 30% | |
- Optimized ETL pipelines with staging tables and data quality checks, increasing ingestion efficiency by 25% | |
**Technical Writer** | |
2023-Present | |
- Embarked on a new journey in 2023 as a technical writer, sharing insights and developments in data science and data engineering with a growing audience. | |
- Authored numerous articles that explore complex topics in an accessible and informative manner, focusing on AI, data science, machine learning and data engineering. | |
- This new habit aims to educate and inspire, bridging the gap between technical expertise and practical application in the modern data landscape. | |
- Find my work on [Medium](https://medium.com/@nihar-palem) and [Substack](https://niharpalem.substack.com/publish/posts). | |
""") | |
def display_skills(): | |
st.title('Skills') | |
# Define tab titles | |
tab_titles = [ | |
"Programming & Core", | |
"AI & ML", | |
"Data Engineering", | |
"Data Architecture", | |
"Visualization", | |
"Specialized Systems" | |
] | |
# Create tabs | |
tabs = st.tabs(tab_titles) | |
# Programming & Core Technologies | |
with tabs[0]: | |
st.subheader("Programming & Core Technologies") | |
st.markdown(""" | |
- **Programming Languages**: | |
- Python (Advanced) | |
- SQL (Advanced) | |
- Shell Scripting | |
- **Database Systems**: | |
- Relational: MySQL, PostgreSQL | |
- NoSQL: MongoDB | |
- Data Warehouses: Snowflake, Redshift | |
- **Development Tools**: | |
- Version Control: Git, GitHub | |
- Containerization: Docker | |
- IDE: VS Code, PyCharm | |
- Microsoft Office Suite | |
""") | |
# AI & Machine Learning | |
with tabs[1]: | |
st.subheader("AI & Machine Learning") | |
st.markdown(""" | |
- **Machine Learning Frameworks**: | |
- PyTorch | |
- TensorFlow | |
- Scikit-Learn | |
- XGBoost, Random Forest, AdaBoost | |
- **Deep Learning**: | |
- Vision Transformers | |
- ResNet Architectures | |
- Neural Networks | |
- BiLSTM | |
- **LLM & NLP**: | |
- LLaMA-3 (70B/8B) | |
- GPT-3.5 | |
- Sentence Transformers | |
- Advanced Prompt Engineering | |
- Multi-agent Architectures | |
- **Computer Vision**: | |
- MediaPipe | |
- OpenCV | |
- Image Processing Pipelines | |
""") | |
# Data Engineering & Cloud | |
with tabs[2]: | |
st.subheader("Data Engineering & Cloud") | |
st.markdown(""" | |
- **Cloud Platforms**: | |
- AWS (Certified) | |
- Google Cloud Platform (GCP) | |
- Cloud Architecture Design | |
- **Big Data Technologies**: | |
- Apache Spark (PySpark) | |
- Apache Airflow | |
- BigQuery | |
- Hadoop Ecosystem | |
- **Data Pipeline Tools**: | |
- ETL/ELT Pipeline Design | |
- Workflow Orchestration | |
- Concurrent Processing | |
- Real-time Data Streaming | |
- **Infrastructure**: | |
- CI/CD Pipelines | |
- Infrastructure as Code | |
-Kubernetes Basics | |
""") | |
# Data Architecture & Analytics | |
with tabs[3]: | |
st.subheader("Data Architecture & Analytics") | |
st.markdown(""" | |
- **Data Modeling**: | |
- OLAP/OLTP Systems | |
- Star/Snowflake Schema | |
- Data Normalization | |
- Database Optimization | |
- **Analytics Techniques**: | |
- Streaming Analytics | |
- Batch Processing | |
- Time Series Analysis | |
- Statistical Analysis | |
- **Data Processing**: | |
- Pandas, NumPy | |
- Data Wrangling | |
- Feature Engineering | |
- Data Quality Assurance | |
- **Performance Optimization**: | |
- Query Optimization | |
- Indexing Strategies | |
- Caching Mechanisms | |
""") | |
# Visualization & Deployment | |
with tabs[4]: | |
st.subheader("Visualization & Tools") | |
st.markdown(""" | |
- **Business Intelligence**: | |
- Tableau | |
- Power BI | |
- Dashboard Design | |
- KPI Monitoring | |
- **Technical Visualization**: | |
- Plotly | |
- Seaborn | |
- Matplotlib | |
- Interactive Charts | |
- **Deployment & Interface**: | |
- Streamlit | |
- Flask | |
- Web Development | |
- **Collaboration Tools**: | |
- JIRA | |
- Notion | |
- Git Workflow | |
- Agile Methodologies | |
""") | |
# Specialized Systems | |
with tabs[5]: | |
st.subheader("Specialized Systems") | |
st.markdown(""" | |
- **Recommender Systems**: | |
- Hybrid Filtering Techniques | |
- Content-Based Filtering | |
- Collaborative Filtering | |
- Matrix Factorization (SVD) | |
- **Ensemble Methods**: | |
- Multi-model Consensus Systems | |
- Classifier Combinations | |
- Voting Systems | |
- Stacking Implementations | |
- **Performance Optimization**: | |
- CUDA Acceleration | |
- Parallel Processing | |
- Resource Management | |
- Scalability Design | |
- **Custom Solutions**: | |
- Natural Language Processing | |
- Computer Vision Systems | |
- Time Series Forecasting | |
- Anomaly Detection | |
""") | |
def display_articles(): | |
"""Display articles from HTML files in the articles directory""" | |
st.markdown('## Articles') | |
# Define the articles directory path | |
articles_dir = "articles" # You can change this path as needed | |
# Check if articles directory exists | |
if not os.path.exists(articles_dir): | |
st.warning(f"Articles directory '{articles_dir}' not found. Please create the directory and add your HTML files.") | |
st.info("Create an 'articles' folder in your project directory and add your HTML files there.") | |
return | |
# Get all HTML files from the articles directory | |
html_files = glob.glob(os.path.join(articles_dir, "*.html")) | |
if not html_files: | |
st.info("No HTML articles found in the articles directory. Add some .html files to get started!") | |
return | |
# Sort files by name for consistent ordering | |
html_files.sort() | |
st.markdown("Click on any article below to open it in a new tab:") | |
st.markdown("---") | |
# Display each article as a clickable link | |
for html_file in html_files: | |
# Extract filename without path and extension, format it nicely | |
file_name = os.path.splitext(os.path.basename(html_file))[0] | |
display_name = file_name.replace('_', ' ').replace('-', ' ').title() | |
# Create columns for better layout | |
col1, col2, col3 = st.columns([3, 1, 1]) | |
with col1: | |
# Create clickable link that opens in new tab | |
file_url = f"file://{os.path.abspath(html_file)}" | |
st.markdown(f"📄 **[{display_name}]({file_url})**", unsafe_allow_html=True) | |
# Add a JavaScript link that opens in new tab (alternative method) | |
st.markdown(f""" | |
<a href="file://{os.path.abspath(html_file)}" target="_blank" style="text-decoration: none;"> | |
<div style="padding: 10px; border: 1px solid #ddd; border-radius: 5px; margin: 5px 0; background-color: #f9f9f9; cursor: pointer;"> | |
📄 {display_name} | |
</div> | |
</a> | |
""", unsafe_allow_html=True) | |
with col2: | |
# Add file size info | |
try: | |
file_size = os.path.getsize(html_file) | |
size_kb = round(file_size / 1024, 1) | |
st.text(f"{size_kb} KB") | |
except: | |
st.text("- KB") | |
with col3: | |
# Add download button for each file | |
try: | |
with open(html_file, 'r', encoding='utf-8') as file: | |
html_content = file.read() | |
st.download_button( | |
label="⬇️", | |
data=html_content, | |
file_name=os.path.basename(html_file), | |
mime="text/html", | |
key=f"download_{file_name}" | |
) | |
except Exception as e: | |
st.text("Error") | |
# Alternative: Serve files through Streamlit (if file:// doesn't work) | |
st.markdown("---") | |
st.info("💡 **Alternative Method**: If the links above don't work, select an article below to view it inline:") | |
# Fallback option with selectbox | |
file_options = [os.path.splitext(os.path.basename(f))[0].replace('_', ' ').title() for f in html_files] | |
selected_idx = st.selectbox( | |
"Choose an article to view inline:", | |
options=range(len(html_files)), | |
format_func=lambda x: file_options[x], | |
key="inline_article_selector" | |
) | |
if st.button("Open Selected Article in New Tab"): | |
selected_file = html_files[selected_idx] | |
# Create a temporary serving method using Streamlit's built-in server | |
try: | |
with open(selected_file, 'r', encoding='utf-8') as file: | |
html_content = file.read() | |
# Use JavaScript to open content in new window | |
st.markdown(f""" | |
<script> | |
var newWindow = window.open(); | |
newWindow.document.write(`{html_content.replace('`', '\\`')}`); | |
newWindow.document.close(); | |
</script> | |
""", unsafe_allow_html=True) | |
except Exception as e: | |
st.error(f"Error opening article: {str(e)}") | |
def display_apps(): | |
st.markdown('## Apps') | |
st.markdown(""" | |
- [CNN arch](https://cnn-arch.streamlit.app/) | |
""") | |
st.markdown(""" | |
- [TuNNe](https://huggingface.co/spaces/Niharmahesh/TuNNe) | |
""") | |
def display_certifications(): | |
st.markdown('## Certifications') | |
certifications = [ | |
{"title": "Python for Data Science and Machine Learning Bootcamp", "issuer": "Udemy", "date": "2023", "skills": "Python, Data Science, Machine Learning"}, | |
{"title": "HackerRank SQL (Basic)", "issuer": "HackerRank", "date": "2023", "skills": "SQL, Database Management"}, | |
{"title": "AWS Cloud Practitioner", "issuer": "Udemy", "date": "2023", "skills": "Cloud Computing, AWS Services"}, | |
{"title": "AWS Certified Cloud Practitioner", "issuer": "Amazon Web Services", "date": "2023", "skills": "Cloud Architecture, AWS Best Practices"} | |
] | |
for cert in certifications: | |
with st.expander(cert["title"]): | |
st.write(f"**Issuer:** {cert['issuer']}") | |
st.write(f"**Date:** {cert['date']}") | |
st.write(f"**Skills:** {cert['skills']}") | |
def display_social_media(): | |
st.markdown('## Social Media') | |
st.markdown(""" | |
- [LinkedIn](https://www.linkedin.com/in/sai-nihar-1b955a183/) | |
- [GitHub](https://github.com/niharpalem) | |
- [Medium](https://medium.com/@nihar-palem) | |
- [Twitter](https://twitter.com/niharpalem_2497) | |
- [Email](mailto:sainiharreddy.palem@sjsu.edu) | |
""") | |
# Updated menu with articles section | |
menu_items_with_icons = { | |
"🎓": display_education, | |
"💼": display_work_experience, | |
"📁": display_projects, | |
"🛠️": display_skills, | |
"📝": display_articles, # New articles section | |
"🌐": display_social_media, | |
"🏆": display_certifications, | |
"📱": display_apps | |
} | |
def main(): | |
# Initialize session state for selected function | |
if 'selected_function' not in st.session_state: | |
st.session_state.selected_function = None # Default to None to not display any section initially | |
# Display the header with your name and Lottie animation first | |
display_header() | |
# Display the summary section immediately after the header | |
display_summary() | |
# Create a row of buttons for each icon in the menu | |
cols = st.columns(len(menu_items_with_icons)) | |
for col, (icon, func) in zip(cols, menu_items_with_icons.items()): | |
if col.button(icon): | |
# Update the session state to the selected function | |
st.session_state.selected_function = func | |
# If a function has been selected, call it | |
if st.session_state.selected_function is not None: | |
st.session_state.selected_function() | |
if __name__ == "__main__": | |
main() |