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", "Jupyter
|
| 8 |
|
| 9 |
# Function to render markdown content with unsafe HTML based on the selected language
|
| 10 |
def render_language_content(selected_language):
|
|
@@ -20,9 +20,12 @@ def render_language_content(selected_language):
|
|
| 20 |
elif selected_language == "Python":
|
| 21 |
website_url = "https://www.jdoodle.com/ia/1eQe"
|
| 22 |
st.components.v1.html(f"""<iframe src="{website_url}" width="100%" height="700px" frameborder="0"></iframe>""",height=700,)
|
| 23 |
-
elif selected_language == "
|
| 24 |
st.markdown("""<iframe src="https://jupyterlite.github.io/demo/repl/index.html?kernel=python&toolbar=1" width="100%" height="700px"></iframe>""",
|
| 25 |
unsafe_allow_html=True)
|
|
|
|
|
|
|
|
|
|
| 26 |
elif selected_language == "HTML/CSS/JS":
|
| 27 |
website_url = "https://www.jdoodle.com/ih/1eQl"
|
| 28 |
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" ,"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):
|
|
|
|
| 20 |
elif selected_language == "Python":
|
| 21 |
website_url = "https://www.jdoodle.com/ia/1eQe"
|
| 22 |
st.components.v1.html(f"""<iframe src="{website_url}" width="100%" height="700px" frameborder="0"></iframe>""",height=700,)
|
| 23 |
+
elif selected_language == "Python Console":
|
| 24 |
st.markdown("""<iframe src="https://jupyterlite.github.io/demo/repl/index.html?kernel=python&toolbar=1" width="100%" height="700px"></iframe>""",
|
| 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="100%" frameborder="0"></iframe>""")
|
| 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,)
|