neelmshah / mercury-poc

Convert Jupyter Notebook into Interactive Web Apps & more
3 stars 0 forks source link

Mercury-PoC

Convert Jupyter notebook into interactive web apps & more.

Let's refer to Mercury official site to get deep dive

Installation

Create Python Virtual Environment

python3 -m venv venv

Activate virtual environment

source venv/bin/activate

Install packages

pip install -r requirements.txt 

Add notebook

mercury add sample_report.ipynb 

Run mercury service

mercury run

Notebook embedding

You can easily embed notebooks served with Mercury.

  1. Open browser http://localhost:8000/
  2. Click on sample report card
  3. Copy page URL (i.e. http://127.0.0.1:8000/app/sample_report)
  4. Add /embed at the end of the URL address.
  5. Insert iframe in the website where you would like to embed a notebook.
<iframe src="http://127.0.0.1:8000/app/sample_report/embed" height="700px" width="1200px"></iframe>