How to
Hectiqlab lets you create and deploy Streamlit, Gradio and Plotly applications in the cloud. Applications can be connected to your datasets, models and artifacts to create interactive visualizations. Use it to showcase your results, inspect a model, and visualize your dataset.
In the web plateform, the applications are available in the App
tab of your projects.
Create an app
You can create your app using the web plateform or with a command line. For the web plateform, the button to create the app is located above the search bar in the app section.
For the command line mode, in a terminal, type
hectiqlab create-app
You'll be invited to enter the project, the name of the app, and the path to the files for your app. The instructions will follow in the prompts.
Authentification
You can use pyhectiqlab
within an app without having to manage the authentification. Each deployed app has an access to the project it belongs to, just like a typical project member. When deploying the app, we automatically attach a secret key that the pyhectiqlab
package uses for authentification. Whenever a new deployment is made, a new secret key is generated and previous ones are invalidated.
Building your app
The app must contain at least two files
app.py
: The execution script.requirements.txt
: A list of requirements.
For example, the app.py
and requirements.txt
files may be
# app.py
import streamlit as st
import numpy as np
from pyhectiqlab.datasets import download_dataset
dataset_path = download_dataset(dataset_name='my-dataset',
project_path='hectiq-ai/demo')
x = st.slider('Select a value')
st.write('sin(x)', np.sin(x))
st.write('Dataset downloaded at ', dataset_path)
# requirements.txt
streamlit
numpy
Cloud instances
The basic instance
The basic instance is always free. Apps deployed with a basic instance have access to a single CPU. The main desavantage of this instance is the cold start. If the app is unused during a long period of time, the instance goes down. Hence, when you open the app again, the instance wakes up so that you have a short down time, usually between 30 seconds and 2 minutes.
The always-on CPU instance
For most of our users, the cold start delay after a long period of disuse can be problematic. We then recommend using the always-on CPU instance. With this instance, you have access to more computing power, and the instance is always responsive. It cost 1$/day and is harged if the app is active at least once in a day. This instance is reserved to projects belonging to organizations.
The always-on GPU instance
We offer an always-on instance with a GPU attached. It cost 5$/day and is harged if the app is active at least once in a day. This instance is reserved to projects belonging to organizations.