Vatsal Gupta commited on
Commit
fc30746
·
unverified ·
2 Parent(s): 1c26ae1f744eef

Merge pull request #16 from gvatsal60/snyk-fix-311d1dcc09470e7955706e8577714b18

Browse files
.github/workflows/{huggingface.yaml → huggingface-push.yaml} RENAMED
@@ -18,7 +18,7 @@ jobs:
18
  - name: Configure Git
19
  run: |
20
  git config --global user.email "action@github.com"
21
- git config --global user.name "${{ github.actor }}"
22
  - name: Push to Hugging Face Hub
23
  env:
24
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
 
18
  - name: Configure Git
19
  run: |
20
  git config --global user.email "action@github.com"
21
+ git config --global user.name "github-actions"
22
  - name: Push to Hugging Face Hub
23
  env:
24
  HF_TOKEN: ${{ secrets.HF_TOKEN }}
.github/workflows/huggingface-test.yaml ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Test on Hugging Face hub
2
+ on:
3
+ pull_request:
4
+ branches: ["*"]
5
+ permissions:
6
+ contents: write
7
+ pull-requests: write
8
+ jobs:
9
+ sync-to-hub:
10
+ runs-on: ubuntu-latest
11
+ environment: HF_TOKEN
12
+ steps:
13
+ - name: Checkout repository
14
+ uses: actions/checkout@v5
15
+ with:
16
+ ref: ${{ github.head_ref }}
17
+ fetch-depth: 0
18
+ lfs: true
19
+ - name: Configure Git
20
+ run: |
21
+ git config --global user.email "action@github.com"
22
+ git config --global user.name "github-actions"
23
+ - name: Push to Hugging Face Hub
24
+ env:
25
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
26
+ HF_USERNAME: ${{ github.repository_owner }}
27
+ HF_SPACE: ${{ github.repository_owner }}/github-test
28
+ HF_BRANCH: main
29
+ PR_BRANCH: ${{ github.head_ref }}
30
+ run: |
31
+ git remote set-url origin https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_SPACE
32
+ git push origin $PR_BRANCH:$HF_BRANCH --force
requirements.txt CHANGED
@@ -1,2 +1,3 @@
1
  google-generativeai
 
2
  streamlit
 
1
  google-generativeai
2
+ pillow>=10.0.1 # not directly required, pinned by Snyk to avoid a vulnerability
3
  streamlit