Update app.py
Browse files
app.py
CHANGED
@@ -141,8 +141,8 @@ if st.button("Test my solution", key=2):
|
|
141 |
candidates = [[candidate_solution]]
|
142 |
pass_at_k, _ = code_eval.compute(references=test_cases, predictions=candidates)
|
143 |
st.markdown(pass_at_k)
|
144 |
-
text = "Your solution didn't pass the test, pass@1 is 0 π" if int(pass_at_k['pass@1']) < 1 else "Congrats your pass@1 is 1! π"
|
145 |
-
st.markdown(text)
|
146 |
if st.button("Show model solution", key=3):
|
147 |
st.markdown(solution)
|
148 |
|
@@ -186,7 +186,7 @@ gen_prompt = st.text_area(
|
|
186 |
value=example_text,
|
187 |
height=200,
|
188 |
).strip()
|
189 |
-
if st.button("Generate code!", key=
|
190 |
with st.spinner("Generating code..."):
|
191 |
# use threading
|
192 |
generations = []
|
|
|
141 |
candidates = [[candidate_solution]]
|
142 |
pass_at_k, _ = code_eval.compute(references=test_cases, predictions=candidates)
|
143 |
st.markdown(pass_at_k)
|
144 |
+
#text = "Your solution didn't pass the test, pass@1 is 0 π" if int(pass_at_k['pass@1']) < 1 else "Congrats your pass@1 is 1! π"
|
145 |
+
#st.markdown(text)
|
146 |
if st.button("Show model solution", key=3):
|
147 |
st.markdown(solution)
|
148 |
|
|
|
186 |
value=example_text,
|
187 |
height=200,
|
188 |
).strip()
|
189 |
+
if st.button("Generate code!", key=4):
|
190 |
with st.spinner("Generating code..."):
|
191 |
# use threading
|
192 |
generations = []
|