Spaces:
Runtime error
Runtime error
Commit
Β·
628bb6f
1
Parent(s):
96f874d
Update app.py
Browse files
app.py
CHANGED
|
@@ -19,25 +19,25 @@ with col3:
|
|
| 19 |
|
| 20 |
st.write("#### Description")
|
| 21 |
description = st.text_input(label="", placeholder="An optional natural language description of the operation", value="add two vectors with broadcasting to get a matrix")
|
| 22 |
-
st.
|
| 23 |
-
|
| 24 |
-
settings_kwargs
|
| 25 |
-
settings_kwargs["
|
| 26 |
-
settings_kwargs["
|
| 27 |
-
settings_kwargs["
|
|
|
|
| 28 |
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
'timeout': settings_kwargs["timeout"],
|
| 31 |
'only_minimal_solutions': settings_kwargs["only_minimal_solutions"],
|
| 32 |
'max_solutions': settings_kwargs["max_solutions"],
|
| 33 |
'require_all_inputs_used': settings_kwargs["require_all_inputs_used"],
|
| 34 |
'require_one_input_used': not settings_kwargs["require_all_inputs_used"],
|
| 35 |
})
|
| 36 |
-
|
| 37 |
-
if st.button("π Search for Tensor Ops!"):
|
| 38 |
-
i = eval(inputs)
|
| 39 |
-
o = eval(output)
|
| 40 |
-
c = eval(constants)
|
| 41 |
with st.spinner("Searching for solution..."):
|
| 42 |
with io.StringIO() as buf, redirect_stdout(buf):
|
| 43 |
results = colab_interface.run_value_search_from_colab(i, o, c, description, settings)
|
|
|
|
| 19 |
|
| 20 |
st.write("#### Description")
|
| 21 |
description = st.text_input(label="", placeholder="An optional natural language description of the operation", value="add two vectors with broadcasting to get a matrix")
|
| 22 |
+
with st.expander("βοΈ Search Options", expanded=False):
|
| 23 |
+
st.sidebar.header("Settings:")
|
| 24 |
+
settings_kwargs = dict()
|
| 25 |
+
settings_kwargs["require_all_inputs_used"] = st.checkbox("Require All Inputs", value=True)
|
| 26 |
+
settings_kwargs["only_minimal_solutions"] = st.checkbox("Only Minimal Solutions", value=False)
|
| 27 |
+
settings_kwargs["max_solutions"] = st.slider("Maximum number of solutions", value=1, min_value=1, step=1, max_value=256)
|
| 28 |
+
settings_kwargs["timeout"] = st.slider("Timeout in seconds", value=300, min_value=1, step=10, max_value=300)
|
| 29 |
|
| 30 |
+
if st.button("π Search for Tensor Ops!"):
|
| 31 |
+
i = eval(inputs)
|
| 32 |
+
o = eval(output)
|
| 33 |
+
c = eval(constants)
|
| 34 |
+
settings = value_search_settings.from_dict({
|
| 35 |
'timeout': settings_kwargs["timeout"],
|
| 36 |
'only_minimal_solutions': settings_kwargs["only_minimal_solutions"],
|
| 37 |
'max_solutions': settings_kwargs["max_solutions"],
|
| 38 |
'require_all_inputs_used': settings_kwargs["require_all_inputs_used"],
|
| 39 |
'require_one_input_used': not settings_kwargs["require_all_inputs_used"],
|
| 40 |
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
with st.spinner("Searching for solution..."):
|
| 42 |
with io.StringIO() as buf, redirect_stdout(buf):
|
| 43 |
results = colab_interface.run_value_search_from_colab(i, o, c, description, settings)
|