Demos
The Demos feature allows you to easily share your Gradio machine learning app (demo) both publicly and privately.
To get started using the Demos feature, you need to:
Host your demo on a new instance.
It currently isn’t possible to host a demo on an existing instance.
The new instance hosting your demo can be used like any other Lambda GPU Cloud on-demand instance. For example, you can SSH into the instance and open Jupyter Notebook on the instance.
As with other Lambda GPU Cloud on-demand instances, you’re billed for all of the time the instance for your demo is running.
The Demos feature can be hosted on multi-GPU instance types. However, Demos uses only one of the GPUs.
Also, demos currently can’t be hosted on H100 instances.
Add a demo to your Lambda GPU Cloud account
In the left sidebar of the dashboard, click Demos. Then, click the Add demo button at the top-right of the dashboard.
The Add a demo dialog will appear.
Under Demo Source URL, enter the URL of the Git repository containing your demo’s source code.
Note
The Demos feature looks in your Git repository for a file named
README.md
. If the file doesn’t exist, or if the file doesn’t contain the required properties, you’ll receive a Demo misconfigured error.The
README.md
must have at the top a YAML block containing the following:Replace GRADIO-VERSION with the version of Gradio your demo is built with, for example,
3.24.1
.Replace PATH-TO-APP-FILE with the path to your Gradio application file (the file containing the Gradio interface code), relative to the root of your Git repository. For example, if your Gradio application file is named
app.py
and is located in the root directory of your Git repository, replace PATH-TO-APP-FILE withapp.py
.Properties other than
sdk
,sdk_version
, andapp_file
are ignored by the Demos feature.Tip
If you don’t yet have your own demo, you can try the Demos feature using the demos created by Lambda’s Machine Learning team. Demos created by Lambda’s Machine Learning team include:
Under Visibility, choose:
Public if you want to list your demo in the library of public models shared by the Lambda community.
Unlisted if you want your demo accessible only by those who know your demo’s URL.
Under Name, give your demo a name. If you choose to make your demo public, the name of your demo will appear in the Lambda library of public models. The name of your demo will also appear in your demo’s URL.
(Optional) Under Description, enter a description for your demo.
The description shows under the name of your demo in your library of demos. If your demo is public, the description also shows under the name of your demo in the Lambda library of public models.
Note
You can’t change the name or description of your demo once you add it. However, you can delete your demo then add it again.
Click Add demo, then follow the prompts to launch a new instance to host your demo.
To host a demo that’s already added to your account, in the Demos dashboard, find the row containing the demo you want to host, then click Host.
Your new instance will take several minutes to launch and for your demo to become accessible.
The link to your demo might temporarily appear in the Instances dashboard, then disappear. This is expected behavior and doesn’t mean your instance or demo is broken.
The models used by demos are often several gigabytes in size, and can take 5 to 15 minutes to download and load.
Once your instance is launched and your demo is accessible, a link with your demo’s name will appear under the Demo column. Click the link to access your demo.
To see a gallery of all of your demos, at the top-right of the Demos dashboard, click the See your demos button.
Troubleshooting demos
If you experience trouble accessing your demo, the Demos logs can be helpful for troubleshooting.
To view the Demos log files, SSH into your instance or open a terminal in Jupyter Notebook, then run:
This command will produce a file named demos_debug_logs.txt
containing the logs for the Demos feature. You can review the logs from within your instance by running less demos_debug_logs.txt
. Alternatively, you can download the file locally to review or share.
The Lambda Support team provides only basic support for the Demos feature. However, assistance might be available in the community forum.
If you’re experiencing problems using the Demos feature, running the above command and providing the demos_debug_logs.txt
file to the Support team can help with future improvements to the Demos feature.
Here are some examples of how problems present in logs:
Misconfigured README.md file
Not a Gradio app
Last updated