Spaces:
Sleeping
Sleeping
epochs-demos
commited on
Commit
•
a9c6ce7
1
Parent(s):
6c07962
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
@@ -56,14 +56,14 @@ def check_solution(code, func_params):
|
|
56 |
|
57 |
|
58 |
def main():
|
59 |
-
|
60 |
with st.form('app'):
|
61 |
st.markdown("<h2 style='color: #707379;'>Coding Challenge - Code Practice</h2>", unsafe_allow_html=True)
|
62 |
-
|
63 |
# Description of the challenge
|
64 |
st.write("Create a function sum that meets the following criteria:")
|
65 |
-
st.write('''
|
66 |
-
|
67 |
# Display sample example for all test cases
|
68 |
sample_examples = "\n".join([f"sum({params}) -> {expected_output}" for params, expected_output in [(1, 2), (2, 3), (3, 4)]])
|
69 |
st.code(sample_examples, language="python")
|
@@ -76,7 +76,7 @@ def main():
|
|
76 |
return a+b''', language="python")
|
77 |
else:
|
78 |
st.error('No Solution Provided!')
|
79 |
-
|
80 |
# Code input area
|
81 |
code = st_ace(value='''def sum(a,b):''', language="python", key="my_editor", theme='clouds', height=200)
|
82 |
# Check solution button
|
|
|
56 |
|
57 |
|
58 |
def main():
|
59 |
+
|
60 |
with st.form('app'):
|
61 |
st.markdown("<h2 style='color: #707379;'>Coding Challenge - Code Practice</h2>", unsafe_allow_html=True)
|
62 |
+
|
63 |
# Description of the challenge
|
64 |
st.write("Create a function sum that meets the following criteria:")
|
65 |
+
st.write('''sass''')
|
66 |
+
|
67 |
# Display sample example for all test cases
|
68 |
sample_examples = "\n".join([f"sum({params}) -> {expected_output}" for params, expected_output in [(1, 2), (2, 3), (3, 4)]])
|
69 |
st.code(sample_examples, language="python")
|
|
|
76 |
return a+b''', language="python")
|
77 |
else:
|
78 |
st.error('No Solution Provided!')
|
79 |
+
|
80 |
# Code input area
|
81 |
code = st_ace(value='''def sum(a,b):''', language="python", key="my_editor", theme='clouds', height=200)
|
82 |
# Check solution button
|