File size: 1,851 Bytes
3d67fe2
 
 
 
 
 
 
 
 
 
72e5351
3d67fe2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72e5351
 
 
 
 
 
3d67fe2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
72e5351
 
 
 
 
 
 
 
 
 
 
 
 
 
3d67fe2
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import streamlit as st
import streamlit.components.v1 as components

# Set page config for dark theme
st.set_page_config(layout="wide", page_title="Web UI", page_icon=":ghost:", initial_sidebar_state="expanded")

# Apply dark theme
st.markdown("""
<style>
    .reportview-container {
        background-color: #000000;
    }
    .sidebar .sidebar-content {
        background-color: #262730;
    }
    .Widget>label {
        color: white;
    }
    .stRadio>div{
        color: white;
    }
    .stCheckbox>div{
        color: white;
    }
    .stSelectbox>div{
        color: white;
    }
    .main .block-container {
        background-color: #000000;
    }
    iframe {
        background-color: #000000;
    }
</style>
""", unsafe_allow_html=True)

# Sidebar menu
st.sidebar.title("๋ฉ”๋‰ด")
menu = st.sidebar.radio("์„ ํƒํ•˜์„ธ์š”:", ("A", "B"))

# Main content
if menu == "A":
    components.iframe("https://seawolf2357-flxloraexp.hf.space", height=800, scrolling=True)
elif menu == "B":
    components.iframe("http://hugpu.ai:8000", height=800, scrolling=True)

# Make the layout responsive
st.markdown("""
<style>
    .reportview-container .main .block-container {
        max-width: 1000px;
        padding-top: 2rem;
        padding-right: 2rem;
        padding-left: 2rem;
        padding-bottom: 2rem;
    }
    .sidebar .sidebar-content {
        width: 300px;
    }
</style>
""", unsafe_allow_html=True)

# Ensure iframes are loaded correctly
st.markdown("""
<script>
    window.addEventListener('load', function() {
        var iframes = document.getElementsByTagName('iframe');
        for (var i = 0; i < iframes.length; i++) {
            iframes[i].onload = function() {
                this.style.height = this.contentWindow.document.body.scrollHeight + 'px';
            }
        }
    });
</script>
""", unsafe_allow_html=True)