feat(demo): mixture mode (n-ingredient hazard screen) + typeahead - #67
Merged
Merged
Conversation
- Mixture mode: a toggle opens a multi-ingredient panel (start with 2 rows, "+ add ingredient", remove per row) plus process checkboxes (high heat / refining / fermentation) and a "Check mixture" button. It calls a new /api/mixture endpoint -> predict.check_mixture(), rendering active hazards and process-conditional ones (benzene, nitrosamine, ethyl carbamate, acrylamide, furan, ...). Surfaces the formulation-level feature that was built but never exposed in the UI. - Typeahead: /api/suggest over the curated flavor_volatiles list; the input's datalist fills as you type (van -> vanillin, ...). Verified: benzoate+ascorbate -> benzene (active) + furan (conditional); nitrite+amine -> nitrosamine; suggest 'van' -> vanillin / ethyl vanillin. Signed-off-by: Austin L. <86896075+rvnminers-A-and-N@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The last two demo asks.
Mixture mode
A toggle opens a multi-ingredient panel: starts with 2 rows, "+ add ingredient", remove per row, process checkboxes (high heat / refining / fermentation), and Check mixture. Calls a new
/api/mixture→predict.check_mixture(), rendering active hazards and process-conditional ones (benzene, nitrosamine, ethyl carbamate, acrylamide, furan, …). This surfaces the formulation-level screen that was built but never exposed.Typeahead
/api/suggestover the curatedflavor_volatileslist; the input's<datalist>fills as you type (van→ vanillin, ethyl vanillin).Verified live: benzoate+ascorbate → ⚠ benzene (active) + furan (conditional on high heat); nitrite + secondary amine → ⚠ N-nitrosamines; suggest works.