Spaces:
Runtime error
Runtime error
christopher
commited on
Commit
β’
7f1aca2
1
Parent(s):
0ce2fd6
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,9 @@
|
|
1 |
import streamlit as st
|
2 |
from tf_coder.value_search import colab_interface
|
3 |
from tf_coder.value_search import value_search_settings
|
|
|
|
|
|
|
4 |
def get_problem():
|
5 |
"""Specifies a problem to run TF-Coder on. Edit this function!"""
|
6 |
# A dict mapping input variable names to input tensors.
|
@@ -32,7 +35,7 @@ settings = value_search_settings.from_dict({
|
|
32 |
|
33 |
i = st.text_area("input tensor","second test")
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
|
|
1 |
import streamlit as st
|
2 |
from tf_coder.value_search import colab_interface
|
3 |
from tf_coder.value_search import value_search_settings
|
4 |
+
import io
|
5 |
+
from contextlib import redirect_stdout
|
6 |
+
|
7 |
def get_problem():
|
8 |
"""Specifies a problem to run TF-Coder on. Edit this function!"""
|
9 |
# A dict mapping input variable names to input tensors.
|
|
|
35 |
|
36 |
i = st.text_area("input tensor","second test")
|
37 |
|
38 |
+
with io.StringIO() as buf, redirect_stdout(buf):
|
39 |
+
colab_interface.run_value_search_from_colab(inputs, output, constants, description, settings)
|
40 |
+
output = buf.getvalue()
|
41 |
+
st.write(output)
|