Tested in Google AI EDGE GALLERY : feedback

#1
by FashionStash - opened

Device : HONOR 200 PRO.
Latest nightly version of Google AI EDGE GALLERY Android application.

I personally think it's an interesting model, it's why I want give a proper feedback.

Well, after downloading the model

  1. I started Google AI EDGE GALLERY Android application.
  2. I imported the model in the app, with settings kept on default, excepted unticked the "Image support" and "GPU", I then opted for the "CPU" mode.
  3. It loaded successfully.

Tested in mode : AI Chat

  1. I asked the model to tell me anything related with Jules Vernes (in my own native language, not in English).
  2. The model provided me a lot of true information about Jules Vernes, all in my native language.
  3. There was some issue with some special non English characters, such as letters accented. But nothing that is would compromise the answer and readability.
  4. Verdict : very great model!

Tested in mode : AI Chat

  1. I asked the model to create a love story between two unicorns (😂). In my native language.
  2. The model refused to do it, pretexting that it was not such a fictional creator model.
  3. I Insisted, but the model was always refusing my demand.
  4. Verdict : sadly unwilling to fulfill my request.

Tested in mode : Prompt Lab (free prompt).

  1. I asked the model to create a PHP 8 class, which would be a PHP class to simulate an inventory system.
  2. The model worked hard and incredibly great to write a full-working system in PHP 8 (will post it afterwards exactly how it was returned to me). With some minor flaws. Flaws was, (1) in ajouterArticle() class method, there is no true meaning of adding a different index of the same item, otherwise it would create a duplicate stock-cap limit, which is not what I asked).. (2) in modifierQuantite() class method, there is the issue expected to be caused by ajouterArticle(), it is a flaws because it's a breach of the logic outside of the former asking).. And finally (3) the name, the model forgot the 'n' letter in the class name from the sourcecode but provided it with the 'n' letter somewhere in the documentation the model added to its answer. (otherwise, particularly handful documentation, all sourcecode and documentation generated in my native language).
  3. In final, the model was able to do what a PC/Computer model would do. It was really surprising how it seemed easy and fast for the model!
    4: Verdict : fullfilled my request, with handful sourcecode comments and even a full API documentation of each of the class method of the generated inventory class.
    5 (as it's an interesting answer, I provide its full answer) :

Bien sûr ! Voici un exemple de classe de gestion d'inventaire PHP 8 :

<?php

class Invetaire
{
    private $articles = [];

    // Ajoute un article
    public function ajouterArticle($article, $quantite)
    {
        if (!isset($this->articles[$article])) {
            $this->articles[$article] = [];
        }
        $this->articles[$article][] = $quantite;
    }

    // Supprime un article
    public function supprimerArticle($article)
    {
        if (isset($this->articles[$article])) {
            unset($this->articles[$article]);
        }
    }

    // Modifie la quantité d'un article
    public function modifierQuantite($article, $quantite)
    {
        if (isset($this->articles[$article])) {
            $this->articles[$article][0] = $quantite;
        }
    }

    // Retourne la liste des articles avec leur quantité
    public function listerArticles()
    {
        $list = [];
        foreach ($this->articles as $article => $quantites) {
            $list[] = [
                'article' => $article,
                'quantites' => $quantites,
            ];
        }
        return $list;
    }

    // Retourne la quantité totale de l'article
    public function getQuantiteTotal($article)
    {
        if (isset($this->articles[$article])) {
            return array_sum($this->articles[$article]);
        }
        return 0;
    }
}

// Exemple d'utilisation
$inv = new Invetaire();

$inv->ajouterArticle('Pomme', 10);
$inv->ajouterArticle('Orange', 20);
$inv->ajouterArticle('Pomme', 15);

print_r($inv->listerArticles());

$inv->modifierQuantite('Pomme', 25);

print_r($inv->listerArticles());

$inv->supprimerArticle('Orange');

Cette classe Inventaire contient plusieurs méthodes pour manipuler l'inventaire :

  • ajouterArticle($article, $quantite) : Ajoute un article avec une quantité donnée.
  • supprimerArticle($article) : Supprime un article.
  • modifierQuantite($article, $quantite) : Modifie la quantité d'un article.
  • listerArticles() : Retourne la liste des articles avec leurs quantités.
  • getQuantiteTotal($article) : Retourne la quantité totale de l'article.

Vous pouvez ajuster et améliorer cette classe selon vos besoins spécifiques.

Tests for the model class in PHP gave me that result :

Array
(
    [0] => Array
        (
            [article] => Pomme
            [quantites] => Array
                (
                    [0] => 10
                    [1] => 15
                )

        )

    [1] => Array
        (
            [article] => Orange
            [quantites] => Array
                (
                    [0] => 20
                )

        )

)
Array
(
    [0] => Array
        (
            [article] => Pomme
            [quantites] => Array
                (
                    [0] => 25
                    [1] => 15
                )

        )

    [1] => Array
        (
            [article] => Orange
            [quantites] => Array
                (
                    [0] => 20
                )

        )

)

Tested in mode : Prompt Lab (free prompt).

  1. I asked the model to create a story of unicorns love (used the same prompt which I used in the first try when I was in AI Chat mode).
  2. The model fullfilled a short story, related between two unicorns, with a start, a plot and a finish! All in my native language.
  3. Verdict : the story was somehow, but resulted in the final of what I asked the model for! Interesting!

Finally, Hammer is a very suitable model LiteRT one, in order to work with Google AI EDGE GALLERY Android application, but some flaws can occurs sometimes, as explained. Without these flaws, it is a true way to make the best of it, offline, I liked the discovery !

Sign up or log in to comment