import streamlit as st
from pathlib import Path
st.set_page_config(
page_title="Pinni Praneeth Kumar | Portfolio",
page_icon="🌐",
layout="wide",
)
base_dir = Path(__file__).parent
html_path = base_dir / "index.html"
css_path = base_dir / "styles.css"
js_path = base_dir / "script.js"
# Read assets
html = html_path.read_text(encoding="utf-8") if html_path.exists() else "
index.html not found
"
css = css_path.read_text(encoding="utf-8") if css_path.exists() else ""
js = js_path.read_text(encoding="utf-8") if js_path.exists() else ""
# Inline CSS and JS by replacing the link/script tags in index.html
html_inlined = html
if css:
html_inlined = html_inlined.replace(
'', f""
)
if js:
html_inlined = html_inlined.replace(
'', f""
)
# Render full HTML document inside Streamlit
# Use components to allow JS execution and custom styles
st.components.v1.html(html_inlined, height=900, scrolling=True)
# Optional footer in Streamlit (outside the embedded app)
st.caption("Hosted with Streamlit on Hugging Face Spaces")