Spaces:
Runtime error
Runtime error
Commit
·
811654f
1
Parent(s):
728a6ed
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,18 +5,19 @@ from tf_coder.value_search import value_search_settings
|
|
| 5 |
import io
|
| 6 |
from contextlib import redirect_stdout
|
| 7 |
|
| 8 |
-
|
| 9 |
-
"""Specifies a problem to run TF-Coder on. Edit this function!"""
|
| 10 |
-
# A dict mapping input variable names to input tensors.
|
| 11 |
inputs = {
|
| 12 |
'rows': [10, 20, 30],
|
| 13 |
'cols': [1, 2, 3, 4],
|
| 14 |
}
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
| 16 |
# The single desired output tensor.
|
| 17 |
output = [[11, 12, 13, 14],
|
| 18 |
[21, 22, 23, 24],
|
| 19 |
-
[31, 32, 33, 34]]
|
| 20 |
|
| 21 |
# A list of relevant scalar constants (if any).
|
| 22 |
constants = []
|
|
@@ -37,7 +38,7 @@ settings = value_search_settings.from_dict({
|
|
| 37 |
i = st.text_area("input tensor","second test")
|
| 38 |
|
| 39 |
with io.StringIO() as buf, redirect_stdout(buf):
|
| 40 |
-
|
| 41 |
-
colab_interface.run_value_search_from_colab(inputs, output, constants, description, settings)
|
| 42 |
output = buf.getvalue()
|
| 43 |
-
st.
|
|
|
|
| 5 |
import io
|
| 6 |
from contextlib import redirect_stdout
|
| 7 |
|
| 8 |
+
|
|
|
|
|
|
|
| 9 |
inputs = {
|
| 10 |
'rows': [10, 20, 30],
|
| 11 |
'cols': [1, 2, 3, 4],
|
| 12 |
}
|
| 13 |
+
inputs = st.text_area('The input tensor(s) specified as key-value pairs', placeholder='''
|
| 14 |
+
'rows': [10, 20, 30],
|
| 15 |
+
'cols': [1,2,3,4],
|
| 16 |
+
'''
|
| 17 |
# The single desired output tensor.
|
| 18 |
output = [[11, 12, 13, 14],
|
| 19 |
[21, 22, 23, 24],
|
| 20 |
+
[31, 32, 33, 34]]
|
| 21 |
|
| 22 |
# A list of relevant scalar constants (if any).
|
| 23 |
constants = []
|
|
|
|
| 38 |
i = st.text_area("input tensor","second test")
|
| 39 |
|
| 40 |
with io.StringIO() as buf, redirect_stdout(buf):
|
| 41 |
+
_ , output, constants, description = get_problem()
|
| 42 |
+
results = colab_interface.run_value_search_from_colab(inputs, output, constants, description, settings)
|
| 43 |
output = buf.getvalue()
|
| 44 |
+
st.code(output, language='bash')
|