No project description provided
Project description
langflow-streamlit
langflow-streamlit
is an API that facilitates communication between Langflow and Streamlit applications. This library enables seamless integration of Langflow's advanced language processing capabilities with Streamlit's user-friendly interface, allowing developers to create interactive applications that leverage powerful language models.
Features
- Easy integration: Quickly set up communication between Langflow and Streamlit with minimal configuration.
- Simple deployment: Easily install and run the API with
pip
orpoetry
. - Flexible execution: Run the full stack (Langflow + streamlit API) or just the Streamlit frontend with API backend.
Requirements
- Python 3.10 or higher
Installation
Option 1: Install via pip
python -m venv env
source env/bin/activate
pip install langflow-streamlit
Option 2: Clone the repository and use Poetry
-
Clone the repository:
git clone https://github.com/yaitec/langflow-streamlit.git cd langflow-streamlit
-
Install Poetry if you haven't already:
pip install poetry
-
Install the project dependencies:
poetry install
Running the Application
-
Run the full stack (Langflow, API, and Streamlit):
python -m langflow-streamlit run
-
Run only the Streamlit frontend and API backend:
python -m langflow-streamlit run --streamlit-only
Usage
How to get Streamlit's Flows from the store
The gif below shows how to search, download, and run Streamlit's flow:
Using Streamlit Components in Langflow
The gif below shows how to use Listen
and Send
components:
Streamlit's Components
Langflow provides the following Streamlit components:
- Send: Send messages to a Streamlit chat session.
- Listen: Listen for incoming messages in a Streamlit chat, altering the layout of the Streamlit application.
Environment variables
VARIABLE | DESCRIPTION | DEFAULT |
---|---|---|
STREAMLIT_ONLY | If True runs only streamlit and streamlit API, else runs langflow too | False |
pip
langflow-streamlit --streamlit-only
make with zshell or bash
export STREAMLIT_ONLY=True
make powershell
$env:STREAMLIT_ONLY = "True"
Notes
- The Streamlit chat runs on port 5001 by default.
- The Streamlit API runs on port 7881 by default.
- Langflow runs on port 7860 by default.
- You can set streamlit_only environment variable to runs with or without langflow.
Using Poetry (after cloning the repository)
-
Run the full stack:
poetry run langflow-streamlit run
-
Run only the Streamlit frontend and API backend:
poetry run langflow-streamlit run --streamlit-only
Using Make commands
-
Run the full stack:
make start
-
Run only the Streamlit frontend and API backend:
make start-streamlit-only
Development
To set up the development environment:
-
Clone the repository (if you haven't already).
-
Install development dependencies:
poetry install --with dev
-
Run tests:
make test
-
Check code style:
make lint
Contributing
Contributions are welcome! Please feel free to submit a Pull Request or open an Issue on the GitHub repository.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contact
YAITEC - contact@yaitec.org
Project Link: https://github.com/yaitec/langflow-streamlit
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for langflow_streamlit-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfd6cc63244bc00a778bea57769dc63c5ab300e57426c495c6961459f1ce9841 |
|
MD5 | 1dfdc87fbfdb273745efa16c13a2e30f |
|
BLAKE2b-256 | 298480b6ddf75117e393a757c2b5eff7a292e8121d79261c54dc289b74a18b06 |
Hashes for langflow_streamlit-0.1.6-4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29530b6d1cf985bc6ed320d5adadbe0be2520ae8a03befb7014f98edc8d2a6e3 |
|
MD5 | 25bb0d6b864936473bcd307a8bd111af |
|
BLAKE2b-256 | aee44336bbd552855c654af3ee560aac60ac36f80805b863bd2d33c975578cc3 |
Hashes for langflow_streamlit-0.1.6-3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf33611d0ff3139e5e41e9757a716e548662da423cd97ceeca2ac350a0e6ebc1 |
|
MD5 | 9af8884eba1c7422c999cfeff83b0dc2 |
|
BLAKE2b-256 | e0651068d7653ddee3ffee734bafc3cb52e03f23ef5dad374e04e11401e5917e |
Hashes for langflow_streamlit-0.1.6-2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2792710adccfe76cbf98cb45bb89b4ad1eb9a85d74a6bd55eda58d1f9d75f74 |
|
MD5 | 947c26609135a678070c5e786b611738 |
|
BLAKE2b-256 | 85a7f63c9f08adea61d82ed879f63e732862bf3e6436430dda6af7289679a523 |
Hashes for langflow_streamlit-0.1.6-1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c737d0bb94a861848a91c47ddd6af770f789d1b81767f83b30544df4b2ff9bd |
|
MD5 | 1539b3fcaaf603b64a75bcf55898d7e5 |
|
BLAKE2b-256 | d287cdf1d874de4e1dde534a6c0603dfebce4cf32d7dffb1633ac217bdbc6159 |