Welcome to Function
Run Python functions on mobile, web, and in the cloud.
Bring a Jupyter notebook with a predict
function, and we'll compile the function to run either on-device or server-side.
Installing Function
Function provides clients for Python, JavaScript, Unity Engine, and the command line interface (CLI):
Function also provides Discord and Slack bots to make predictions right in your team conversations:
Make predictions in any conversation with the `/predict` slash command.
Make predictions in any conversation with the `/predict` slash command.
Logging in to Functon
After installing the Function CLI (see above), head over to fxn.ai ↗ to create an access key:
Next, login to Function CLI with your access key:
# Open a terminal and run the following command
fxn auth login <ACCESS KEY>
Making a Prediction
Now let's make a prediction with the Stable Diffusion ↗ model which generates an image based on a text prompt. Run the following command:
# Generate an image from a text prompt using Stable Diffusion
fxn predict @samples/stable-diffusion --prompt "An astronaut riding a horse on mars"
Join the Party
At this point, you've seen what Function is all about. Before getting into the weeds, here are a few useful links:
Come get ideas on how others are thinking of integrating AI into their workflows and products.
You can open issues for any bugs and get technical help on our GitHub.