Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -272,22 +272,22 @@ def display_python_parts():
|
|
| 272 |
for part, content in python_parts.items():
|
| 273 |
with st.expander(f"{content['emoji']} {part} - {content['details']}", expanded=False):
|
| 274 |
if st.button(f"Show Example for {part}", key=f"example_{part}"):
|
| 275 |
-
example = "
|
| 276 |
example_placeholders[part] = example
|
| 277 |
st.code(example_placeholders[part], language="python")
|
| 278 |
-
response = chat_with_model(f'Write python script
|
| 279 |
response_placeholders[part] = response
|
| 280 |
st.markdown(f"#### {content['emoji']} {part} Example")
|
| 281 |
st.code(response_placeholders[part], language="python")
|
| 282 |
|
| 283 |
if st.button(f"Take Quiz on {part}", key=f"quiz_{part}"):
|
| 284 |
-
quiz = "Python script quiz
|
| 285 |
-
response = chat_with_model(f'Write python
|
| 286 |
response_placeholders[part] = response
|
| 287 |
st.markdown(f"#### {content['emoji']} {part} Quiz")
|
| 288 |
st.code(response_placeholders[part], language="python")
|
| 289 |
|
| 290 |
-
prompt = f"Write python script
|
| 291 |
if st.button(f"Explore {part}", key=part):
|
| 292 |
response = chat_with_model(prompt, part)
|
| 293 |
response_placeholders[part] = response
|
|
|
|
| 272 |
for part, content in python_parts.items():
|
| 273 |
with st.expander(f"{content['emoji']} {part} - {content['details']}", expanded=False):
|
| 274 |
if st.button(f"Show Example for {part}", key=f"example_{part}"):
|
| 275 |
+
example = "Write short python script examples with mock data in python list dictionary for inputs for " + part
|
| 276 |
example_placeholders[part] = example
|
| 277 |
st.code(example_placeholders[part], language="python")
|
| 278 |
+
response = chat_with_model(f'Write python script with short code examples for: {content["details"]}', part)
|
| 279 |
response_placeholders[part] = response
|
| 280 |
st.markdown(f"#### {content['emoji']} {part} Example")
|
| 281 |
st.code(response_placeholders[part], language="python")
|
| 282 |
|
| 283 |
if st.button(f"Take Quiz on {part}", key=f"quiz_{part}"):
|
| 284 |
+
quiz = "Write Python script quiz examples with mock static data inputs for " + part
|
| 285 |
+
response = chat_with_model(f'Write python code blocks for quiz program: {quiz}', part)
|
| 286 |
response_placeholders[part] = response
|
| 287 |
st.markdown(f"#### {content['emoji']} {part} Quiz")
|
| 288 |
st.code(response_placeholders[part], language="python")
|
| 289 |
|
| 290 |
+
prompt = f"Write python script with a few advanced coding examples using mock data input for {content['details']}"
|
| 291 |
if st.button(f"Explore {part}", key=part):
|
| 292 |
response = chat_with_model(prompt, part)
|
| 293 |
response_placeholders[part] = response
|