Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,7 +4,7 @@ st.set_page_config(layout="wide")
|
|
| 4 |
default_language_index = 3
|
| 5 |
# Dropdown menu for selecting a programming language
|
| 6 |
language = st.selectbox("Pick a Programming Language:",
|
| 7 |
-
["C", "C++", "C#", "Python", "Python Console", "Jupyter Notebooks" ,"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):
|
|
@@ -25,7 +25,10 @@ def render_language_content(selected_language):
|
|
| 25 |
unsafe_allow_html=True)
|
| 26 |
elif selected_language == "Jupyter Notebooks":
|
| 27 |
website_url = "https://jupyter.org/try"
|
| 28 |
-
st.components.v1.html(f"""<iframe src="{website_url}" width="100%" height="
|
|
|
|
|
|
|
|
|
|
| 29 |
elif selected_language == "HTML/CSS/JS":
|
| 30 |
website_url = "https://www.jdoodle.com/ih/1eQl"
|
| 31 |
st.components.v1.html(f"""<iframe src="{website_url}" width="100%" height="1000px" frameborder="0"></iframe>""",height=1000,)
|
|
|
|
| 4 |
default_language_index = 3
|
| 5 |
# Dropdown menu for selecting a programming language
|
| 6 |
language = st.selectbox("Pick a Programming Language:",
|
| 7 |
+
["C", "C++", "C#", "Python", "Python Console", "Jupyter Notebooks", "Ipython Notebook" ,"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):
|
|
|
|
| 25 |
unsafe_allow_html=True)
|
| 26 |
elif selected_language == "Jupyter Notebooks":
|
| 27 |
website_url = "https://jupyter.org/try"
|
| 28 |
+
st.components.v1.html(f"""<iframe src="{website_url}" width="100%" height="700px" frameborder="0"></iframe>""", height=700)
|
| 29 |
+
elif selected_language == "Ipython Notebook":
|
| 30 |
+
website_url = "https://jupyterlite.github.io/demo/lab/index.html"
|
| 31 |
+
st.components.v1.html(f"""<iframe src="{website_url}" width="100%" height="700px" frameborder="0"></iframe>""", height=700)
|
| 32 |
elif selected_language == "HTML/CSS/JS":
|
| 33 |
website_url = "https://www.jdoodle.com/ih/1eQl"
|
| 34 |
st.components.v1.html(f"""<iframe src="{website_url}" width="100%" height="1000px" frameborder="0"></iframe>""",height=1000,)
|