Spaces:
Runtime error
Runtime error
Update app.py
Browse files238 unmodified lines239240241242243244238 unmodified linesdef display_python_parts():st.title("Python Interactive Learning Platform")for part, content in python_parts.items():with st.expander(f"{content['emoji']} {part} - {content['details']}", expanded=False):if st.button(f"Show Example for {part}", key=f"example_{part}"):238 unmodified lines239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276238 unmodified linesdef display_python_parts():st.title("Python Interactive Learning Platform")for part, content in python_parts.items():with st.expander(f"{content['emoji']} {part} - {content['details']}", expanded=False):if st.button(f"Show Example for {part}", key=f"example_{part}"):example = "Python script example with mock example inputs for " + partexample_placeholders[part] = examplest.code(example_placeholders[part], language="python")response = chat_with_model(f'Create detailed advanced python script code examples for: {content["details"]}', part)response_placeholders[part] = responsewith st.expander(f"Example Output for {part}", expanded=True):st.markdown(f"{content['emoji']} **{part} Example**")st.markdown(response_placeholders[part])if st.button(f"Take Quiz on {part}", key=f"quiz_{part}"):quiz = "Python script quiz example with mock example inputs for " + partresponse = chat_with_model(quiz, part)response_placeholders[part] = responsewith st.expander(f"Quiz for {part}", expanded=True):st.markdown(f"{content['emoji']} **{part} Quiz**")st.markdown(response_placeholders[part])prompt = f"Learn about advanced coding examples using mock example inputs for {content['details']}"if st.button(f"Explore {part}", key=part):response = chat_with_model(prompt, part)response_placeholders[part] = responsewith st.expander(f"Details for {part}", expanded=True):st.markdown(f"{content['emoji']} **{part} Details**")st.markdown(response_placeholders[part])def display_python_parts_old():st.title("Python Interactive Learning Platform")for part, content in python_parts.items():with st.expander(f"{content['emoji']} {part} - {content['details']}", expanded=False):if st.button(f"Show Example for {part}", key=f"example_{part}"):
app.py+32