Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -292,17 +292,17 @@ def display_python_parts():
|
|
292 |
if st.button(f"Show Example for {part}", key=f"example_{part}"):
|
293 |
example = "Python script example with mock example inputs for " + part
|
294 |
example_placeholders[part] = example
|
295 |
-
st.code(example_placeholders[part], language="python")
|
296 |
response = chat_with_model('Create detailed advanced python script code examples for:' + example_placeholders[part], part)
|
|
|
297 |
if st.button(f"Take Quiz on {part}", key=f"quiz_{part}"):
|
298 |
quiz = "Python script quiz example with mock example inputs for " + part
|
299 |
response = chat_with_model(quiz, part)
|
|
|
300 |
prompt = f"Learn about advanced coding examples using mock example inputs for {content['details']}"
|
301 |
if st.button(f"Explore {part}", key=part):
|
302 |
response = chat_with_model(prompt, part)
|
303 |
response_placeholders[part] = response
|
304 |
-
|
305 |
-
st.markdown(f"**Response:** {response_placeholders[part]}")
|
306 |
|
307 |
def add_paper_buttons_and_links():
|
308 |
page = st.sidebar.radio("Choose a page:", ["Python Pair Programmer"])
|
|
|
292 |
if st.button(f"Show Example for {part}", key=f"example_{part}"):
|
293 |
example = "Python script example with mock example inputs for " + part
|
294 |
example_placeholders[part] = example
|
|
|
295 |
response = chat_with_model('Create detailed advanced python script code examples for:' + example_placeholders[part], part)
|
296 |
+
st.code(response, language="python")
|
297 |
if st.button(f"Take Quiz on {part}", key=f"quiz_{part}"):
|
298 |
quiz = "Python script quiz example with mock example inputs for " + part
|
299 |
response = chat_with_model(quiz, part)
|
300 |
+
st.code(response, language="python")
|
301 |
prompt = f"Learn about advanced coding examples using mock example inputs for {content['details']}"
|
302 |
if st.button(f"Explore {part}", key=part):
|
303 |
response = chat_with_model(prompt, part)
|
304 |
response_placeholders[part] = response
|
305 |
+
st.code(response, language="python")
|
|
|
306 |
|
307 |
def add_paper_buttons_and_links():
|
308 |
page = st.sidebar.radio("Choose a page:", ["Python Pair Programmer"])
|