Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,11 +1,10 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
# Dropdown menu for selecting a programming language
|
| 7 |
language = st.selectbox("Pick a Programming Language:",
|
| 8 |
-
["C", "C++", "C#", "JavaScript", "Python", "HTML/CSS/JS"])
|
| 9 |
|
| 10 |
# Function to render markdown content with unsafe HTML based on the selected language
|
| 11 |
def render_language_content(selected_language):
|
|
@@ -22,7 +21,7 @@ def render_language_content(selected_language):
|
|
| 22 |
st.markdown("<h3 style='color:red;'>You selected JavaScript.</h3><p>Add your custom HTML here.</p>",
|
| 23 |
unsafe_allow_html=True)
|
| 24 |
elif selected_language == "Python":
|
| 25 |
-
st.markdown("""<iframe width="
|
| 26 |
unsafe_allow_html=True)
|
| 27 |
elif selected_language == "HTML/CSS/JS":
|
| 28 |
st.markdown("<h3 style='color:pink;'>You selected HTML/CSS/JS.</h3><p>Add your custom HTML here.</p>",
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
+
st.set_page_config(layout="wide")
|
| 4 |
+
default_language_index = 4
|
|
|
|
| 5 |
# Dropdown menu for selecting a programming language
|
| 6 |
language = st.selectbox("Pick a Programming Language:",
|
| 7 |
+
["C", "C++", "C#", "JavaScript", "Python", "HTML/CSS/JS"], index=default_language_index)
|
| 8 |
|
| 9 |
# Function to render markdown content with unsafe HTML based on the selected language
|
| 10 |
def render_language_content(selected_language):
|
|
|
|
| 21 |
st.markdown("<h3 style='color:red;'>You selected JavaScript.</h3><p>Add your custom HTML here.</p>",
|
| 22 |
unsafe_allow_html=True)
|
| 23 |
elif selected_language == "Python":
|
| 24 |
+
st.markdown("""<iframe width="1500" height="1000" src="https://codehs.com/sandbox/id/python-3-kr6mEw/embed/?display_mode=default" frameborder="0" allowfullscreen class="video-iframe"></iframe>""",
|
| 25 |
unsafe_allow_html=True)
|
| 26 |
elif selected_language == "HTML/CSS/JS":
|
| 27 |
st.markdown("<h3 style='color:pink;'>You selected HTML/CSS/JS.</h3><p>Add your custom HTML here.</p>",
|