Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:ampl/mp into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
mapgccv committed Mar 7, 2024
2 parents eba597e + b2144c9 commit 3e337d6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
4 changes: 4 additions & 0 deletions support/modelexplore/.streamlit/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[server]
enableXsrfProtection = false
enableCORS = false

26 changes: 26 additions & 0 deletions support/modelexplore/modelexplore.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

import streamlit as st

# To work in st 1.30.1, see
# https://discuss.streamlit.io/t/axioserror-request-failed-with-status-code-403/38112/13
input_file = st.file_uploader("Model file (JSONL)")

left_column, right_column = st.columns(2)

# You can use a column just like st.sidebar:
srch = left_column.text_input('Search pattern:')

# Or even better, call Streamlit functions inside a "with" block:
fwd = right_column.checkbox('Add descendants', disabled=True)
bwd = right_column.checkbox('Add ancestors', disabled=True)

if input_file is not None:
with left_column:
bytes_data = input_file.read()
st.write("NL model")
st.write(bytes_data)
with right_column:
st.write("Flat model")
else:
with left_column:
st.write("No file selected.")

0 comments on commit 3e337d6

Please sign in to comment.