[new] streamlit deployment (#1034)
This commit is contained in:
62
docs/deployment/streamlit_io.mdx
Normal file
62
docs/deployment/streamlit_io.mdx
Normal file
@@ -0,0 +1,62 @@
|
||||
---
|
||||
title: 'Streamlit.io'
|
||||
description: 'Deploy your RAG application to streamlit.io platform'
|
||||
---
|
||||
|
||||
Embedchain offers a Streamlit template to facilitate the development of RAG chatbot applications in just three easy steps.
|
||||
|
||||
Follow the instructions given below to deploy your first application quickly:
|
||||
|
||||
## Step-1: Create RAG app
|
||||
|
||||
We provide a command line utility called `ec` in embedchain that inherits the template for `streamlit.io` platform and help you deploy the app. Follow the instructions to create a streamlit.io app using the template provided:
|
||||
|
||||
```bash Install embedchain
|
||||
pip install embedchain
|
||||
```
|
||||
|
||||
```bash Create application
|
||||
mkdir my-rag-app
|
||||
ec create --template=streamlit.io
|
||||
```
|
||||
|
||||
This will generate a directory structure like this:
|
||||
|
||||
```bash
|
||||
├── .streamlit
|
||||
│ └── secrets.toml
|
||||
├── app.py
|
||||
├── embedchain.json
|
||||
└── requirements.txt
|
||||
```
|
||||
|
||||
Feel free to edit the files as required.
|
||||
- `app.py`: Contains API app code
|
||||
- `.streamlit/secrets.toml`: Contains secrets for your application
|
||||
- `embedchain.json`: Contains embedchain specific configuration for deployment (you don't need to configure this)
|
||||
- `requirements.txt`: Contains python dependencies for your application
|
||||
|
||||
Add your `OPENAI_API_KEY` in `.streamlit/secrets.toml` file to run and deploy the app.
|
||||
|
||||
## Step-2: Test app locally
|
||||
|
||||
You can run the app locally by simply doing:
|
||||
|
||||
```bash Run locally
|
||||
pip install -r requirements.txt
|
||||
ec dev
|
||||
```
|
||||
|
||||
## Step-3: Deploy to streamlit.io
|
||||
|
||||

|
||||
|
||||
Use the deploy button from the streamlit website to deploy your app.
|
||||
|
||||
You can refer this [guide](https://docs.streamlit.io/streamlit-community-cloud/deploy-your-app) if you run into any problems.
|
||||
|
||||
## Seeking help?
|
||||
|
||||
If you run into issues with deployment, please feel free to reach out to us via any of the following methods:
|
||||
|
||||
<Snippet file="get-help.mdx" />
|
||||
@@ -9,6 +9,7 @@ After successfully setting up and testing your RAG app locally, the next step is
|
||||
<Card title="Fly.io" href="/deployment/fly_io"></Card>
|
||||
<Card title="Modal.com" href="/deployment/modal_com"></Card>
|
||||
<Card title="Render.com" href="/deployment/render_com"></Card>
|
||||
<Card title="Streamlit.io" href="/deployment/streamlit_io"></Card>
|
||||
<Card title="Embedchain Platform" href="#option-1-deploy-on-embedchain-platform"></Card>
|
||||
<Card title="Self-hosting" href="#option-2-self-hosting"></Card>
|
||||
</CardGroup>
|
||||
|
||||
@@ -89,7 +89,8 @@
|
||||
"get-started/deployment",
|
||||
"deployment/fly_io",
|
||||
"deployment/modal_com",
|
||||
"deployment/render_com"
|
||||
"deployment/render_com",
|
||||
"deployment/streamlit_io"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user