This is the project for a streamlit component which uses semantha semantic compare.
semantha-streamlit-compare: semantha building blocks for Streamlit apps
This project gives you an idea of how to use our component for building applications with streamlit. And all of this using semantha's native capabilities to process semantics in text.
tl;dr: using Streamlit, you can employ semantha's semantic comparison with just three lines of code (see below).
Which Components Are Involved?
Streamlit.io offers easy GUI implementations. semantha.ai is a semantic processing platform which provides a REST/API for many use cases, end systems, etc.
You can install
semantha-streamlit-compare from pip:
pip install semantha-streamlit-compare
Then put the following example code in a file.
from semantha_streamlit_compare.components.compare import SemanticCompare compare = SemanticCompare() compare.build_input(sentences=("First sentence", "Second sentence"))
🎛 Setup, Secret, and API Key
To use the component, you need to request a secrets.toml file. You can request that at email@example.com
The file is structured as follows:
[semantha] server_url="URL_TO_SERVER" api_key="YOUR_API_KEY_ISSUED" domain="USAGE_DOMAIN_PROVIDED_TO_YOU" documenttype="document_with_contradiction_enabled"
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for semantha_streamlit_compare-0.2.1.tar.gz
Hashes for semantha_streamlit_compare-0.2.1-py3-none-any.whl