Getting started¶
Launch the Gradio AI Interface, sign in, and check one sentiment prediction from the terminal.
You need: an AWS account that can subscribe on AWS Marketplace, launch EC2, and start a Session Manager port-forwarding session. Install the AWS CLI and the Session Manager plugin on your workstation.
1. Subscribe¶
Open the Gradio AI Interface listing, choose View purchase options, review the terms, and subscribe. When the subscription is active, choose Launch your software.
2. Launch the instance¶
On the EC2 launch page:
- Choose t3.large (8 GiB of memory) or larger, x86_64.
- Under Configure storage, use an encrypted gp3 root volume of at least 32 GiB.
- Require IMDSv2.
- Attach an IAM instance profile that includes
AmazonSSMManagedInstanceCore. - Allow the outbound access Session Manager needs. Leave inbound application ports closed.
- Choose Launch instance.
Wait until cloud-init and automatic first boot finish before you sign in.
3. Connect¶
In the EC2 console, select the instance, choose Connect, then Session Manager, then Connect. Or:
Switch to ubuntu:
The published guide documents Session Manager for this shell.
4. Open the interface¶
The application listens on loopback port 7860. On your workstation, start a forward and leave it running. Keep both ends on localhost.
aws ssm start-session --target <instance-id> \
--document-name AWS-StartPortForwardingSession \
--parameters '{"portNumber":["7860"],"localPortNumber":["7860"]}'
Open http://127.0.0.1:7860 in your browser.
5. Sign in¶
First boot writes /home/ubuntu/.config/sushi-gradio/access.json with mode
0600. Read it only in your own session, and type the username and password
into the Gradio login page. Keep them out of command arguments, logs,
screenshots, recordings, and support mail.
Restarts and reboots keep this first identity. Do not delete the file to force a new account.
6. Predict and check the result¶
In the page, enter helpful excellent service, choose Submit, and read
the saved ID, class, and probabilities. awful poor service is the negative
example. Text must be at most 512 characters and 64 English words, and it
must include a word from the original examples.
The terminal client calls the same authenticated queue API. Use a new output file each time:
sushi-gradio predict --text 'helpful excellent service' \
--output ~/gradio-results/review.json
sushi-gradio read ~/gradio-results/review.json
sushi-gradio read checks the saved prediction. You can also run
bash /opt/sushi/docs/demo.sh as ubuntu.
The teaching model is not for consequential decisions. Predictions persist in
/var/lib/gradio/predictions.sqlite3. Next, see
Configuration for the files to back up with that database.
Last updated October 27, 2026 · Suggest an improvement