Skip to content

muna-ai/muna-flutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Muna for Flutter

Run AI models in Flutter. Register at muna.ai.

Installing Muna

Add muna to your pubspec.yaml:

dependencies:
  muna: ^0.0.1

Quickstart

import "package:muna/muna.dart";

// Create the Muna client
final muna = Muna(accessKey: "your_access_key");

// Retrieve the current user
final user = await muna.users.retrieve();
print(user?.username);

// Retrieve a predictor
final predictor = await muna.predictors.retrieve("@owner/predictor-tag");
print(predictor?.name);

// Create a remote prediction
final prediction = await muna.beta.predictions.create(
  "@owner/predictor-tag",
  inputs: { "prompt": "Hello world!" },
);
print(prediction.results);

// Stream a remote prediction
await for (final prediction in muna.beta.predictions.stream(
  "@owner/predictor-tag",
  inputs: { "prompt": "Hello world!" },
)) {
  print(prediction.results);
}

Useful Links

Muna is a product of NatML Inc.

About

Run AI models in your Flutter apps. https://muna.ai/explore

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages