vsj0702 commited on
Commit
ab2413a
·
verified ·
1 Parent(s): 06db2bd

Adding voice bot

Browse files
Files changed (1) hide show
  1. app.py +4 -14
app.py CHANGED
@@ -4,29 +4,20 @@ from utils import execute_code
4
  from chatbot import render_chatbot
5
  from layout import init_session_state, apply_theme
6
 
7
- # Page config
8
  st.set_page_config(page_title="Pro Code Playground", page_icon="💻", layout="wide")
9
-
10
- # Session init
11
  init_session_state()
12
 
13
- # Theme toggle (emojis)
14
- theme_choice = st.radio("🎨 Theme", options=["☀️", "🌙"], horizontal=True, label_visibility="collapsed")
15
  st.session_state.dark_mode = (theme_choice == "🌙")
16
-
17
- # Apply theme + get styles
18
  colors, ace_theme = apply_theme()
19
 
20
- # Header
21
  st.title("Pro Code Playground")
22
  st.markdown("Write, execute & export Python snippets, with built‑in AI assistance.")
23
 
24
- # Layout
25
  gen, bot = st.columns((2, 1), gap="large")
26
 
27
  with gen:
28
  st.subheader("Editor")
29
-
30
  code = st_ace.st_ace(
31
  value=st.session_state.code,
32
  placeholder="Start typing your Python code…",
@@ -44,7 +35,7 @@ with gen:
44
  st.session_state.code = code
45
 
46
  user_input = st.text_area(
47
- label="📥 Input (stdin)",
48
  value=st.session_state.stdin,
49
  placeholder="Enter input() values here, one per line",
50
  height=100,
@@ -72,9 +63,8 @@ with bot:
72
  st.session_state.get("error_output", "")
73
  )
74
 
75
- # Footer
76
- st.markdown(f"""
77
  <div style='text-align:center; margin-top:1rem; opacity:0.6;'>
78
  Built with ❤️ & Streamlit by Vaibhav
79
  </div>
80
- """, unsafe_allow_html=True)
 
4
  from chatbot import render_chatbot
5
  from layout import init_session_state, apply_theme
6
 
 
7
  st.set_page_config(page_title="Pro Code Playground", page_icon="💻", layout="wide")
 
 
8
  init_session_state()
9
 
10
+ theme_choice = st.radio("Theme", options=["☀️", "🌙"], horizontal=True, label_visibility="collapsed")
 
11
  st.session_state.dark_mode = (theme_choice == "🌙")
 
 
12
  colors, ace_theme = apply_theme()
13
 
 
14
  st.title("Pro Code Playground")
15
  st.markdown("Write, execute & export Python snippets, with built‑in AI assistance.")
16
 
 
17
  gen, bot = st.columns((2, 1), gap="large")
18
 
19
  with gen:
20
  st.subheader("Editor")
 
21
  code = st_ace.st_ace(
22
  value=st.session_state.code,
23
  placeholder="Start typing your Python code…",
 
35
  st.session_state.code = code
36
 
37
  user_input = st.text_area(
38
+ label="📅 Input (stdin)",
39
  value=st.session_state.stdin,
40
  placeholder="Enter input() values here, one per line",
41
  height=100,
 
63
  st.session_state.get("error_output", "")
64
  )
65
 
66
+ st.markdown("""
 
67
  <div style='text-align:center; margin-top:1rem; opacity:0.6;'>
68
  Built with ❤️ & Streamlit by Vaibhav
69
  </div>
70
+ """, unsafe_allow_html=True)