Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hwchase17/langchain-gradio-template
https://github.com/hwchase17/langchain-gradio-template
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/hwchase17/langchain-gradio-template
- Owner: hwchase17
- Created: 2023-01-09T03:41:31.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-01-19T21:24:11.000Z (about 2 years ago)
- Last Synced: 2024-12-03T10:45:05.872Z (about 2 months ago)
- Language: Python
- Size: 3.91 KB
- Stars: 134
- Watchers: 4
- Forks: 30
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-langchain-zh - Gradio Template - gradio-template?style=social): 如何在 Gradio 上部署 LangChain 的模板 (工具 / 模板)
- awesome-langchain - Gradio Template - gradio-template?style=social) (Tools / Templates)
README
# LangChain-Gradio Template
This repo serves as a template for how to deploy a LangChain on Gradio.
This is particularly useful because you can easily deploy Gradio apps on Hugging Face spaces,
making it very easy to share you LangChain applications on there.This repo contains an `app.py` file which has a template for a chatbot implementation.
This was heavily inspired [James Weaver's examples](https://huggingface.co/JavaFXpert).## Adding your chain
To add your chain, you need to change the `load_chain` function in `app.py`.
Depending on the type of your chain, you may also need to change the inputs/outputs that occur later on (in the `chat` function).## Deploying to Hugging Face spaces
To deploy to Hugging Face spaces, you should first create a new Gradio space on Hugging Face.
From there, you can then copy over the `app.py` file here, and the `requirements.txt`.
Do not copy over this ReadMe - Hugging Face spaces requires a ReadMe in a particular format.