Spaces:
Sleeping
Sleeping
File size: 648 Bytes
334e624 bec59b5 b2a06ee 4478a31 bec59b5 b2a06ee | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | import streamlit as st
import streamlit.components.v1 as components
def read_file(file_path):
with open(file_path, 'r') as file:
return file.read()
# Read HTML, CSS, and JS files
html_content = read_file('index.html')
css_content = '<style>' + read_file('style.css') + '</style>'
js_content = '<script>' + read_file('script.js') + '</script>'
# Combine the content
complete_html = html_content.replace('<link rel="stylesheet" href="style.css">', css_content)
complete_html = complete_html.replace('<script src="script.js"></script>', js_content)
# Render the combined content in Streamlit
components.html(complete_html, height=600)
|