christopher's picture
Update app.py
7d34933
raw
history blame
1.06 kB
import streamlit as st
import numpy as np
import tensorflow as tf
from tf_coder.value_search import colab_interface
from tf_coder.value_search import value_search_settings as settings_module
inputs = st.text_area('A dict mapping input variable names to input tensors.', placeholder='''
{'rows': [10, 20, 30],
'cols': [1, 2, 3, 4],}
''')
output = st.text_area('The corresponding output tensor.', placeholder='''
[[11, 12, 13, 14],
[21, 22, 23, 24],
[31, 32, 33, 34]]
''')
constants = st.text_input('A list of relevant scalar constants, if any.', placeholder='[]' )
description = st.text_input('An English natural language description of the tensor manipulation', placeholder='Add two vectors with broadcasting to get a matrix')
settings = settings_module.from_dict({
'timeout': 300,
'only_minimal_solutions': False,
'max_solutions': 1,
'require_all_inputs_used': True,
'require_one_input_used': False,
})
st.write(colab_interface.run_value_search_from_colab(inputs, output, constants, description, settings))