AMPL on Streamlit

Since AMPL and all Solvers are now available as Python Packages. To use them in streamlit you just need to list the modules in the requirements.txt file as follows:

--index-url # AMPL's Python Package Index
ampl_module_base # AMPL
ampl_module_highs # HiGHS solver
ampl_module_gurobi # Gurobi solver
amplpy # Python API for AMPL

and load them in

from amplpy import AMPL
ampl = AMPL()

N-Queens using AMPL and HiGHS

Run it locally:

$ git clone
$ cd streamlit-nqueens
$ python -m venv venv
$ sournce venv/bin/activate
$ python -m install -r requirements.txt --upgrade
$ streamlit run

Deploy to Streamlit Cloud for free!