Spaces:
Running
Running
Commit
·
843cbaa
1
Parent(s):
76e5d05
Update demo
Browse files
app.py
CHANGED
|
@@ -45,7 +45,7 @@ max_weight = st.slider("Max Weight", 2, 10, 3)
|
|
| 45 |
examples = example_set[examples_key]
|
| 46 |
|
| 47 |
# extract constants from examples
|
| 48 |
-
st.subheader("Synthesis
|
| 49 |
program_bank = extract_constants(examples)
|
| 50 |
program_bank_str = [p.str() for p in program_bank]
|
| 51 |
print("\nSynthesis Log:")
|
|
@@ -115,6 +115,7 @@ elapsed_time = round(end_time - start_time, 4)
|
|
| 115 |
|
| 116 |
# check if program was found
|
| 117 |
print("\nSynthesis Results:")
|
|
|
|
| 118 |
if final_program is None:
|
| 119 |
print(f"- Max weight of {max_weight} reached, no program found in {elapsed_time}s.")
|
| 120 |
|
|
@@ -126,9 +127,9 @@ else:
|
|
| 126 |
print(f"- Program return type: {final_program.type.__name__}")
|
| 127 |
|
| 128 |
st.write(f":white_check_mark: Program found in {elapsed_time}s.")
|
| 129 |
-
st.
|
| 130 |
-
st.
|
| 131 |
-
st.
|
| 132 |
|
| 133 |
st.header("🔎 Algorithm Details")
|
| 134 |
|
|
|
|
| 45 |
examples = example_set[examples_key]
|
| 46 |
|
| 47 |
# extract constants from examples
|
| 48 |
+
st.subheader("Synthesis Steps")
|
| 49 |
program_bank = extract_constants(examples)
|
| 50 |
program_bank_str = [p.str() for p in program_bank]
|
| 51 |
print("\nSynthesis Log:")
|
|
|
|
| 115 |
|
| 116 |
# check if program was found
|
| 117 |
print("\nSynthesis Results:")
|
| 118 |
+
st.subheader("Synthesis Results")
|
| 119 |
if final_program is None:
|
| 120 |
print(f"- Max weight of {max_weight} reached, no program found in {elapsed_time}s.")
|
| 121 |
|
|
|
|
| 127 |
print(f"- Program return type: {final_program.type.__name__}")
|
| 128 |
|
| 129 |
st.write(f":white_check_mark: Program found in {elapsed_time}s.")
|
| 130 |
+
st.markdown(f"Program: `{final_program.str()}`")
|
| 131 |
+
st.markdown(f"Weight: `{final_program.weight}`")
|
| 132 |
+
st.markdown(f"Return Type: `{final_program.type.__name__}`")
|
| 133 |
|
| 134 |
st.header("🔎 Algorithm Details")
|
| 135 |
|