Spaces:
Runtime error
Runtime error
Commit
·
5da936b
1
Parent(s):
62094f4
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,9 +1,6 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
-
import numpy as np
|
| 3 |
-
import tensorflow as tf
|
| 4 |
from tf_coder.value_search import colab_interface
|
| 5 |
-
from tf_coder.value_search import value_search_settings
|
| 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.
|
|
@@ -25,7 +22,7 @@ def get_problem():
|
|
| 25 |
|
| 26 |
return inputs, output, constants, description
|
| 27 |
|
| 28 |
-
settings =
|
| 29 |
'timeout': 300,
|
| 30 |
'only_minimal_solutions': False,
|
| 31 |
'max_solutions': 1,
|
|
@@ -37,6 +34,5 @@ i = st.text_area("input tensor","second test")
|
|
| 37 |
|
| 38 |
inputs, output, constants, description = get_problem()
|
| 39 |
t = colab_interface.run_value_search_from_colab(inputs, output, constants, description, settings)
|
| 40 |
-
|
| 41 |
-
st.write(t.
|
| 42 |
-
st.write(t.statistics)
|
|
|
|
| 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.
|
|
|
|
| 22 |
|
| 23 |
return inputs, output, constants, description
|
| 24 |
|
| 25 |
+
settings = value_search_settings.from_dict({
|
| 26 |
'timeout': 300,
|
| 27 |
'only_minimal_solutions': False,
|
| 28 |
'max_solutions': 1,
|
|
|
|
| 34 |
|
| 35 |
inputs, output, constants, description = get_problem()
|
| 36 |
t = colab_interface.run_value_search_from_colab(inputs, output, constants, description, settings)
|
| 37 |
+
for e in ["benchmark", "count", "index", "settings", "solutions", "statistics", "total_time", "value_set", "values_by_weight"]:
|
| 38 |
+
st.write(eval(f"t.{e}")
|
|
|