Run Python functions (a.k.a. "predictors") locally on Android, iOS, macOS, Linux, in the browser, and Windows--with full GPU acceleration and zero dependencies:
import { Function } from "fxnjs"
// 💥 Create your Function client
const fxn = new Function({ accessKey: "..." });
// 🔥 Run predictions on-device
const prediction = await fxn.predictions.create({
tag: "@fxn/greeting",
inputs: { name: "Peter" }
});
// 🚀 Use the results
console.log(prediction.results[0])
Tip
Join our waitlist to bring your custom Python functions and run them on-device across Android, iOS, macOS, Linux, web, and Windows.
You can make on-device predictions using our client libraries:
- Function for Python. Make predictions in your Python, FastAPI, Flask, and Django apps.
- Function for JavaScript. Make predictions in your web, Node.js, Next.js, and React apps.
- Function for iOS. Make predictions in your iOS, iPadOS, and macOS Catalyst apps.
- Function for Android. Make predictions in your Kotlin and Java Android apps. Coming soon.
- Function for React Native. Make predictions in your React Native apps for iOS and Android. Coming soon.
- Function for Unity Engine. Make predictions in your Unity apps and games.
- Function CLI. Make predictions in the command line.
A few useful links:
- Join our Discord community.
- Check out our docs.
- Learn more about us on our blog.
- Reach out to us at stdin@fxn.ai.
Function is a product of NatML Inc.