Leverage Python Frameworks for Instant Deployment in Einblick

Becca Weng - November 28th, 2023

In today's fast-paced technological landscape, the ability to deploy applications and share data insights seamlessly has become a game-changer for businesses and developers alike. Recognizing this need for instant deployment, Einblick introduces an innovative feature that simplifies the process of deploying model inference endpoints, serving APIs, publishing dashboards, and more.

Instant Deployment Made Effortless

By allowing users to deploy their data insights and endpoints directly from the canvas where they were created, this feature significantly streamlines the deployment process, eliminating the need for complex configurations, pipelines, and managing different credentials. The ability to instantly deploy applications opens up a world of possibilities for accessibility and collaboration. Teams can easily share prototypes, showcase models, or collaborate on interactive dashboards without the hassle of complicated deployment procedures.

Quick Start

Einblick Incoming Connections Tab ScreenshotEinblick Incoming Connections Tab Screenshot
  1. Open the relevant canvas in app.einblick.ai
  2. To deploy, simply go to Kernel Settings in the upper left corner > Incoming Connections >  "Allow incoming connections."
  3. Configure any relevant settings within your Python code (see examples below). Note that the host is 0.0.0.0 and the port is 7000.
  4. Einblick takes care of the rest, making the deployed app accessible via the unique URL seen in the Incoming Connections tab.
    1. Ex: https://your-einblick-endpoint-string.proxy.einblick.ai/

Try it out today, and share with us what you’ve built.

NOTE: Even on our free tier, your deployment will be live for 30 minutes. After which point you’ll need to restart the kernel and re-run your Python cells for a new session. You can read more about our latest features on our change log.

Einblick ensures versatility by allowing seamless integration with popular frameworks like Flask, FastAPI, and Dash. Here’s a look at a few example frameworks that work perfectly in Einblick. You can check out more on our tools page, where we post quick tutorials on how to use interesting and powerful Python packages.

Flask Deployment

A popular web framework is Flask, which allows users to create and deploy ML models among other things. To deploy on Einblick, all you need to do is build your app with Flask and follow the above steps in the quick start. Then use the following code in your canvas.

if __name__ == "__main__":
  app.run(host="0.0.0.0", port=7000)

FastAPI Deployment

We also built out an app using FastAPI another popular web framework. Here’s the key code snippet to add to your FastAPI deployment. You can check out our full FastAPI tutorial on our tools page.

import nest_asyncio
nest_asyncio.apply()

def run():
   uvicorn.run(app, host="0.0.0.0", port=7000, loop="none")

# If the notebook is the main program, invoke the run function
if __name__ == "__main__":
   run()

Dash Deployment

For those leveraging Plotly Dash for creating web applications with interactive visualizations, Einblick offers a hassle-free deployment process. With Einblick, sharing Dash applications becomes as simple as sharing a URL, facilitating collaboration and accessibility. To run the Dash app through Einblick, just use the following code chunk:

# Run the server
if __name__ == '__main__':
    app.run_server(debug=True, host="0.0.0.0", port=7000)

About

Einblick is an AI-native data science platform that provides data teams with an agile workflow to swiftly explore data, build predictive models, and deploy data apps. Founded in 2020, Einblick was developed based on six years of research at MIT and Brown University. Einblick is funded by Amplify Partners, Flybridge, Samsung Next, Dell Technologies Capital, and Intel Capital. For more information, please visit www.einblick.ai and follow us on LinkedIn and Twitter.