seawolf2357 commited on
Commit
3d67fe2
1 Parent(s): 4e3ba78

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +55 -0
app.py ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import streamlit.components.v1 as components
3
+
4
+ # Set page config for dark theme
5
+ st.set_page_config(layout="wide", page_title="Web UI", page_icon=":ghost:", initial_sidebar_state="expanded")
6
+
7
+ # Apply dark theme
8
+ st.markdown("""
9
+ <style>
10
+ .reportview-container {
11
+ background-color: #0e1117;
12
+ }
13
+ .sidebar .sidebar-content {
14
+ background-color: #262730;
15
+ }
16
+ .Widget>label {
17
+ color: white;
18
+ }
19
+ .stRadio>div{
20
+ color: white;
21
+ }
22
+ .stCheckbox>div{
23
+ color: white;
24
+ }
25
+ .stSelectbox>div{
26
+ color: white;
27
+ }
28
+ </style>
29
+ """, unsafe_allow_html=True)
30
+
31
+ # Sidebar menu
32
+ st.sidebar.title("메뉴")
33
+ menu = st.sidebar.radio("선택하세요:", ("A", "B"))
34
+
35
+ # Main content
36
+ if menu == "A":
37
+ components.iframe("https://seawolf2357-flxloraexp.hf.space", height=800, scrolling=True)
38
+ elif menu == "B":
39
+ components.iframe("http://hugpu.ai:8000", height=800, scrolling=True)
40
+
41
+ # Make the layout responsive
42
+ st.markdown("""
43
+ <style>
44
+ .reportview-container .main .block-container {
45
+ max-width: 1000px;
46
+ padding-top: 2rem;
47
+ padding-right: 2rem;
48
+ padding-left: 2rem;
49
+ padding-bottom: 2rem;
50
+ }
51
+ .sidebar .sidebar-content {
52
+ width: 300px;
53
+ }
54
+ </style>
55
+ """, unsafe_allow_html=True)