Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -246,27 +246,24 @@ def display_python_parts():
|
|
| 246 |
example = "Python script example with mock example inputs for " + part
|
| 247 |
example_placeholders[part] = example
|
| 248 |
st.code(example_placeholders[part], language="python")
|
| 249 |
-
response = chat_with_model(f'Create detailed advanced python script code examples for: {content["details"]}', part)
|
| 250 |
response_placeholders[part] = response
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
st.markdown(response_placeholders[part])
|
| 254 |
|
| 255 |
if st.button(f"Take Quiz on {part}", key=f"quiz_{part}"):
|
| 256 |
quiz = "Python script quiz example with mock example inputs for " + part
|
| 257 |
-
response = chat_with_model(quiz, part)
|
| 258 |
response_placeholders[part] = response
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
st.markdown(response_placeholders[part])
|
| 262 |
|
| 263 |
-
prompt = f"Learn about advanced coding examples using mock example inputs for {content['details']}"
|
| 264 |
if st.button(f"Explore {part}", key=part):
|
| 265 |
response = chat_with_model(prompt, part)
|
| 266 |
response_placeholders[part] = response
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
st.markdown(response_placeholders[part])
|
| 270 |
|
| 271 |
|
| 272 |
def display_python_parts_old():
|
|
|
|
| 246 |
example = "Python script example with mock example inputs for " + part
|
| 247 |
example_placeholders[part] = example
|
| 248 |
st.code(example_placeholders[part], language="python")
|
| 249 |
+
response = chat_with_model(f'Write python script: Create detailed advanced python script code examples for: {content["details"]}', part)
|
| 250 |
response_placeholders[part] = response
|
| 251 |
+
st.markdown(f"#### {content['emoji']} {part} Example")
|
| 252 |
+
st.code(response_placeholders[part], language="python")
|
|
|
|
| 253 |
|
| 254 |
if st.button(f"Take Quiz on {part}", key=f"quiz_{part}"):
|
| 255 |
quiz = "Python script quiz example with mock example inputs for " + part
|
| 256 |
+
response = chat_with_model(f'Write python script: {quiz}', part)
|
| 257 |
response_placeholders[part] = response
|
| 258 |
+
st.markdown(f"#### {content['emoji']} {part} Quiz")
|
| 259 |
+
st.code(response_placeholders[part], language="python")
|
|
|
|
| 260 |
|
| 261 |
+
prompt = f"Write python script: Learn about advanced coding examples using mock example inputs for {content['details']}"
|
| 262 |
if st.button(f"Explore {part}", key=part):
|
| 263 |
response = chat_with_model(prompt, part)
|
| 264 |
response_placeholders[part] = response
|
| 265 |
+
st.markdown(f"#### {content['emoji']} {part} Details")
|
| 266 |
+
st.code(response_placeholders[part], language="python")
|
|
|
|
| 267 |
|
| 268 |
|
| 269 |
def display_python_parts_old():
|