News for hackers. Stuff that matters.

CokieMonster

Re:Show HN: Python Patch and Mock Examples on Thursday September 21, 2023 @06:40AM (#37595763)
Im always forgetting how to use Patching and Mocking in python, so created a small MWE to remind myself of how to do it. Turns out it can do more than I thought.

Just posting her in case anyone else is always forgetting and needs a reference.

Show HN: Serverless Portrait Style Transfer

https://github.com/whitew1994WW/lambda-dual-style-gan

AWS Lambda is a lesser known powerhouse for machine learning. We demonstrate how you can bundle up a large generative model (8GB) into a Docker image for a serverless deployment, using parallel model loading to improve the inference time.Its not fast, but hey it is free.

( Read More... | no comments | 3 points | on HN )
Re:Show HN: PyIng – Ingredient parser on Tuesday March 29, 2022 @05:05AM (#30840370)
I'd like to have a go at ingredient substitution next, that takes quantity into account (For instance 2 drops of vanilla essence, might be equivalent to 1/2 a vanilla pod)
Re:Show HN: PyIng – Ingredient parser on Tuesday March 29, 2022 @05:02AM (#30840356)
That would be nice, but at the moment the algo is at the mercy of the training dataset. The dataset doesn't distinguish adjectives from the ingredient, so this module doesn't :(
Re:Show HN: PyIng – Ingredient parser on Tuesday March 29, 2022 @03:45AM (#30839908)
Not yet, wanted to get something out there first. The model could do with a bit of improvement anyway.
Re:Show HN: PyIng – Ingredient parser on Tuesday March 29, 2022 @03:42AM (#30839887)
To be honest you might well be able to deal with it without ML and it certainly would be easier to transfer to other languages you are right. There are a couple of reasons though:

- I wanted to see if I could, I hadn't done any NLP before :) - Some ingredient strings can be complex or contain multiple quantities/ingredients e.g. "3 1/2 cups icing sugar, plus 1/2 cup for dusting". "3 ripe avocados or guacamole" - I am interested to see what can be done with the ingredient embedding, perhaps for ingredient substitution - Hopefully the ML algorithm can learn to identify the unit and quantity based on context rather than a fixed list of ingredients

Show HN: PyIng – Ingredient parser

For far to long ingredient parsers been unavailable to the public. Either due to obsene complexity:https://github.com/nytimes/ingredient-phrase-taggerOr because of the dreaded paywall:https://github.com/mtlynch/zestful-clientWait no longer, I introduce PyIng. An easy to use python package for changing this "2 ounces of spicy melon" into this {name: melon, unit: ounces, qty:...

( Read More... | 31 comments | 107 points | on HN )