Spaces:
Sleeping
Sleeping
epochs-demos
commited on
Commit
•
bb7a836
1
Parent(s):
87a4903
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
@@ -88,7 +88,7 @@ def main():
|
|
88 |
# Generate sample examples dynamically by executing the instructor's code
|
89 |
test_cases = [(1, 2), (2, 3), (3, 4)]
|
90 |
sample_examples = "\n".join([f"{func}({', '.join(map(str, params))}) -> {execute_instructor_code(params)}" for params in test_cases])
|
91 |
-
st.
|
92 |
show_solution_button = st.form_submit_button("Show Solution")
|
93 |
if show_solution_button:
|
94 |
solution = '''def sum(a,b):
|
|
|
88 |
# Generate sample examples dynamically by executing the instructor's code
|
89 |
test_cases = [(1, 2), (2, 3), (3, 4)]
|
90 |
sample_examples = "\n".join([f"{func}({', '.join(map(str, params))}) -> {execute_instructor_code(params)}" for params in test_cases])
|
91 |
+
st.code(sample_examples, language="python")
|
92 |
show_solution_button = st.form_submit_button("Show Solution")
|
93 |
if show_solution_button:
|
94 |
solution = '''def sum(a,b):
|