Skip to main content

Tools for semantic nutrition

Project description

Semantic Nutrition

This repo demonstrates how our basic semantic nutrition API works. We submitted this process as a clinical abtract to MLHC 2020 (poster, abstract).

This is a base version of what was presented at the MLHC, and operates on a limited dataset. The dataset we used for training and publication is not ours to share. If you're interested in using your own nutrition dataset with this API, you can designate a different (local or hosted) URL when you initialize the class. The USDA provides an excellent starting point to build a dataset.

Installation

pip install nutritiontools

Usage

from nutritiontools import Nutrition

n_obj = Nutrition() 

match = n_obj.semantic_search("I ate an apple") 

print(match)

Connecting to mobile assistants, placing the API in an online server, and managing a database

For testing purposes, we used Siri Shortcuts (iOS) and Google Assistant / IFTTT webhooks (Android) to send voice transcriptions to Google Firebase. Once received, the incoming data would trigger a Firebase Cloud Function. The Firebase Function relayed the voice transcription to our Semantic Nutrition API(hosted online with Flask and Google App Engine), which responded with estimates for nutrition data. The nutrition data was then logged in Google Firebase.

While useful for testing and demonstrations, this method has been depecrated in favor of a native mobile application and private server / database. Please stay tuned for future developments, and feel free to use our API locally in the meantime!

updated on 7/27/2020

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

semanticjoshuadrc-0.0.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

semanticjoshuadrc-0.0.1-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file semanticjoshuadrc-0.0.1.tar.gz.

File metadata

  • Download URL: semanticjoshuadrc-0.0.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for semanticjoshuadrc-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4924b6e7424586e28464202697408d0995ec91be08d788a13d82c5efa9519338
MD5 495df6df727d1257950906084eb2b05b
BLAKE2b-256 baa95e678055ec861787fe56f274dbc8b69530f776b3e62f998a03950a5038c2

See more details on using hashes here.

File details

Details for the file semanticjoshuadrc-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: semanticjoshuadrc-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for semanticjoshuadrc-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bef1874cf3d662d09d86f58d74f6631e44df3a80f63a3d44c55e50c7b2e29b81
MD5 c7c45dabe61b9c9e73b7a045c81b683f
BLAKE2b-256 47148e90075f09d9118129bfddf371bf6f55f06522fc3e97de3e870a25abc4a3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page