Joshua Sundance Bailey commited on
Commit
a8085fb
β€’
2 Parent(s): 2877441 566e412

Merge pull request #6 from joshuasundance-swca/initial_improvements

Browse files
.github/workflows/{pull.yml β†’ check-file-size-limit.yml} RENAMED
File without changes
.github/workflows/{push.yml β†’ docker-hub.yml} RENAMED
@@ -1,4 +1,4 @@
1
- name: Build, Deploy
2
 
3
  on:
4
  push:
@@ -14,8 +14,9 @@ jobs:
14
  fetch-depth: 0
15
  token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }}
16
 
17
- - name: Build Docker image
18
- run: docker build -t joshuasundance/langchain-streamlit-demo .
 
19
 
20
  - name: Log in to Docker Hub
21
  uses: docker/login-action@v1
@@ -23,19 +24,12 @@ jobs:
23
  username: joshuasundance
24
  password: ${{ secrets.DOCKERHUB_TOKEN }}
25
 
26
- - name: Push to Docker Hub
27
- run: docker push joshuasundance/langchain-streamlit-demo:latest
28
-
29
- push-to-huggingface:
30
- runs-on: ubuntu-latest
31
- steps:
32
- - uses: actions/checkout@v2
33
- with:
34
- fetch-depth: 0
35
- token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }}
36
-
37
- - name: Push to HuggingFace Space
38
- env:
39
- HF_TOKEN: ${{ secrets.HF_TOKEN }}
40
  run: |
41
- git push https://joshuasundance:[email protected]/spaces/joshuasundance/langchain-streamlit-demo main
 
 
 
 
 
 
 
1
+ name: Push to Docker Hub
2
 
3
  on:
4
  push:
 
14
  fetch-depth: 0
15
  token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }}
16
 
17
+ - name: Store SHA
18
+ id: vars
19
+ run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
20
 
21
  - name: Log in to Docker Hub
22
  uses: docker/login-action@v1
 
24
  username: joshuasundance
25
  password: ${{ secrets.DOCKERHUB_TOKEN }}
26
 
27
+ - name: Build Docker image
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  run: |
29
+ docker build \
30
+ -t joshuasundance/langchain-streamlit-demo:${{ steps.vars.outputs.sha_short }} \
31
+ -t joshuasundance/langchain-streamlit-demo:latest \
32
+ .
33
+
34
+ - name: Push to Docker Hub
35
+ run: docker push joshuasundance/langchain-streamlit-demo
.github/workflows/hf-space.yml ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Push to HuggingFace Space
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ workflow_dispatch:
7
+
8
+ jobs:
9
+ push-to-huggingface:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v2
13
+ with:
14
+ fetch-depth: 0
15
+ token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }}
16
+
17
+ - name: Push to HuggingFace Space
18
+ env:
19
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
20
+ run: |
21
+ git push https://joshuasundance:[email protected]/spaces/joshuasundance/langchain-streamlit-demo main
LICENSE ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Joshua Sundance Bailey
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
README.md CHANGED
@@ -2,10 +2,11 @@
2
  title: langchain-streamlit-demo
3
  emoji: 🦜
4
  colorFrom: green
5
- colorTo: blue
6
  sdk: docker
7
  app_port: 7860
8
- pinned: true
 
9
  ---
10
 
11
  # langchain-streamlit-demo
@@ -18,11 +19,6 @@ pinned: true
18
  [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
19
  [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
20
 
21
-
22
- [![Open HuggingFace Space](https://huggingface.co/datasets/huggingface/badges/raw/main/open-in-hf-spaces-xl.svg)](https://huggingface.co/spaces/joshuasundance/langchain-streamlit-demo)
23
-
24
- [Docker Hub](https://hub.docker.com/r/joshuasundance/langchain-streamlit-demo)
25
-
26
- `docker pull joshuasundance/langchain-streamlit-demo`
27
-
28
- or `docker compose up`
 
2
  title: langchain-streamlit-demo
3
  emoji: 🦜
4
  colorFrom: green
5
+ colorTo: red
6
  sdk: docker
7
  app_port: 7860
8
+ pinned:
9
+ tags: [langchain, streamlit, docker]
10
  ---
11
 
12
  # langchain-streamlit-demo
 
19
  [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)
20
  [![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
21
 
22
+ [![Docker](https://img.shields.io/badge/docker-%230db7ed.svg?&logo=docker&logoColor=white)](https://hub.docker.com/r/joshuasundance/langchain-streamlit-demo)
23
+ [![Docker Image Size (tag)](https://img.shields.io/docker/image-size/joshuasundance/langchain-streamlit-demo/latest)](https://hub.docker.com/r/joshuasundance/langchain-streamlit-demo)
24
+ [![Open HuggingFace Space](https://huggingface.co/datasets/huggingface/badges/raw/main/open-in-hf-spaces-sm.svg)](https://huggingface.co/spaces/joshuasundance/langchain-streamlit-demo)
 
 
 
 
 
pyproject.toml DELETED
File without changes
requirements.txt CHANGED
@@ -1,7 +1,7 @@
1
- anthropic
2
- langchain
3
- langsmith
4
- openai
5
  streamlit==1.26.0
6
- streamlit-feedback
7
- tiktoken
 
1
+ anthropic==0.3.11
2
+ langchain==0.0.293
3
+ langsmith==0.0.38
4
+ openai==0.28.0
5
  streamlit==1.26.0
6
+ streamlit-feedback==0.1.2
7
+ tiktoken==0.5.1