Git Product home page Git Product logo

emoji's People

Contributors

bfirsh avatar cbh123 avatar fofr avatar mattrothenberg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

emoji's Issues

Emoji.Predictions.Prediction Is Failing

It looks like this functionality was added in 2004eeb but it's causing the app to fail. In my fly.io logs I am seeing:

2023-09-26T14:33:44Z app[148ed770fe2258] dfw [info]14:33:44.701 [error] GenServer #PID<0.2594.0> terminating
2023-09-26T14:33:44Z app[148ed770fe2258] dfw [info]** (Ecto.NoResultsError) expected at least one result but got none in query:
2023-09-26T14:33:44Z app[148ed770fe2258] dfw [info]from p0 in Emoji.Predictions.Prediction,
2023-09-26T14:33:44Z app[148ed770fe2258] dfw [info]  where: is_nil(p0.embedding) and not is_nil(p0.emoji_output) and p0.score != 10,
2023-09-26T14:33:44Z app[148ed770fe2258] dfw [info]  order_by: [asc: fragment("RANDOM()")],
2023-09-26T14:33:44Z app[148ed770fe2258] dfw [info]  limit: 1
2023-09-26T14:33:44Z app[148ed770fe2258] dfw [info]    (ecto 3.10.3) lib/ecto/repo/queryable.ex:161: Ecto.Repo.Queryable.one!/3
2023-09-26T14:33:44Z app[148ed770fe2258] dfw [info]    (emoji 0.1.0) lib/emoji/embeddings/worker.ex:35: Emoji.Embeddings.Worker.handle_info/2
2023-09-26T14:33:44Z app[148ed770fe2258] dfw [info]    (stdlib 5.0.2) gen_server.erl:1077: :gen_server.try_handle_info/3
2023-09-26T14:33:44Z app[148ed770fe2258] dfw [info]    (stdlib 5.0.2) gen_server.erl:1165: :gen_server.handle_msg/6
2023-09-26T14:33:44Z app[148ed770fe2258] dfw [info]    (stdlib 5.0.2) proc_lib.erl:241: :proc_lib.init_p_do_apply/3
2023-09-26T14:33:44Z app[148ed770fe2258] dfw [info]Last message: :work

Of note, I cleared out my predictions table to start fresh (though even when it had content it was failing too). I am running 92f44d7.

Website not downloading images

Some generated images don't get downloaded upon click, inspecting the console (using eruda mobile console) shows scripts errors.

(Ecto.NoResultsError) expected at least one result but got none in query:

getting this error in local and also on fly

investigating now

[debug] QUERY OK source="predictions" db=0.4ms idle=1217.6ms
SELECT count(*) FROM "predictions" AS p0 WHERE (NOT (p0."image_embedding") IS NULL) []
↳ Emoji.Embeddings.Worker.should_generate_image_embedding?/0, at: lib/emoji/embeddings/worker.ex:36
[debug] QUERY OK source="predictions" db=0.4ms idle=1218.3ms
SELECT count(*) FROM "predictions" AS p0 WHERE (NOT (p0."embedding") IS NULL) []
↳ Emoji.Embeddings.Worker.should_generate_text_embedding?/0, at: lib/emoji/embeddings/worker.ex:28
[debug] QUERY OK source="predictions" db=0.2ms idle=1219.0ms
SELECT p0."id", p0."no_bg_output", p0."emoji_output", p0."prompt", p0."uuid", p0."score", p0."count_votes", p0."is_featured", p0."local_user_id", p0."moderation_score", p0."moderator", p0."embedding", p0."image_embedding", p0."embedding_model", p0."inserted_at", p0."updated_at" FROM "predictions" AS p0 WHERE (((p0."embedding" IS NULL) AND NOT (p0."emoji_output" IS NULL)) AND (p0."score" != 10)) ORDER BY RANDOM() LIMIT 1 []
↳ Emoji.Embeddings.Worker.handle_info/2, at: lib/emoji/embeddings/worker.ex:81
[error] GenServer #PID<0.730.0> terminating
** (Ecto.NoResultsError) expected at least one result but got none in query:

from p0 in Emoji.Predictions.Prediction,
  where: is_nil(p0.embedding) and not is_nil(p0.emoji_output) and p0.score != 10,
  order_by: [asc: fragment("RANDOM()")],
  limit: 1

    (ecto 3.10.3) lib/ecto/repo/queryable.ex:161: Ecto.Repo.Queryable.one!/3
    (emoji 0.1.0) lib/emoji/embeddings/worker.ex:81: Emoji.Embeddings.Worker.handle_info/2
    (stdlib 3.17.1) gen_server.erl:695: :gen_server.try_dispatch/4
    (stdlib 3.17.1) gen_server.erl:771: :gen_server.handle_msg/6
    (stdlib 3.17.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
Last message: :work
State: %{}

How to Host

Heyo! This is a super neat app and I saw it looks like it should be possible to deploy it to Fly.io. I've attempted to do this but I don't think I've got it completely working.

  1. I cloned the repo.
  2. Ran mix setup.
  3. I moved the fly.toml file aside - mv fly.toml fly.toml.bak.
  4. Then ran flyctl launch. I deployed it with a PostgreSQL database though I don't think that is necessary - correct me if I am wrong.
  5. I added a secret via the Fly.io web dashboard for REPLICATE_API_TOKEN and filled it in with the token I obtained from https://replicate.com. I redeployed the app so it would use the token.
  6. Upon visiting my instance https://custom-emoji.fly.dev I can type something in, and it will generate the emoji however about 3 seconds later the page refreshes and says something about not being able to find the internet and reconnecting.
Screenshot 2023-09-12 at 11 18 38

Any ideas on getting this to work would be very much appreciated. If there's any other information or details I can provide to help troubleshoot please don't hesitate to let me know!

Thanks,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.