Archisman Karmakar
commited on
Commit
·
70739ed
1
Parent(s):
6a5f30c
fix7
Browse files- .github/workflows/deploy_to_HF_space.yml +13 -1
- .github/workflows/ossar.yml +0 -61
- app_main_hf.py +4 -4
.github/workflows/deploy_to_HF_space.yml
CHANGED
@@ -29,16 +29,28 @@ jobs:
|
|
29 |
sudo apt-get update
|
30 |
sudo xargs -a packages.txt apt-get install -y
|
31 |
|
|
|
|
|
|
|
|
|
|
|
32 |
- name: Upgrade pip
|
33 |
run: python -m pip install --upgrade pip
|
34 |
|
35 |
- name: Install dependencies
|
36 |
run: |
|
37 |
pip install poetry
|
38 |
-
poetry install --no-root
|
|
|
|
|
39 |
|
40 |
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
41 |
|
|
|
|
|
|
|
|
|
|
|
42 |
- name: Configure Git
|
43 |
run: |
|
44 |
git config --global user.email "[email protected]"
|
|
|
29 |
sudo apt-get update
|
30 |
sudo xargs -a packages.txt apt-get install -y
|
31 |
|
32 |
+
- name: Rename Poetry files to ingore
|
33 |
+
run: |
|
34 |
+
mv pyproj.toml pyproject.toml.ignore
|
35 |
+
mv poetry.lock poetry.lock.ignore
|
36 |
+
|
37 |
- name: Upgrade pip
|
38 |
run: python -m pip install --upgrade pip
|
39 |
|
40 |
- name: Install dependencies
|
41 |
run: |
|
42 |
pip install poetry
|
43 |
+
# poetry install --no-root
|
44 |
+
|
45 |
+
pip install -r requirements.txt
|
46 |
|
47 |
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
48 |
|
49 |
+
- name: Rename Poetry files to original
|
50 |
+
run: |
|
51 |
+
mv pyproject.toml.ignore pyproject.toml
|
52 |
+
mv poetry.lock.ignore poetry.lock
|
53 |
+
|
54 |
- name: Configure Git
|
55 |
run: |
|
56 |
git config --global user.email "[email protected]"
|
.github/workflows/ossar.yml
DELETED
@@ -1,61 +0,0 @@
|
|
1 |
-
# This workflow uses actions that are not certified by GitHub.
|
2 |
-
# They are provided by a third-party and are governed by
|
3 |
-
# separate terms of service, privacy policy, and support
|
4 |
-
# documentation.
|
5 |
-
|
6 |
-
# This workflow integrates a collection of open source static analysis tools
|
7 |
-
# with GitHub code scanning. For documentation, or to provide feedback, visit
|
8 |
-
# https://github.com/github/ossar-action
|
9 |
-
name: OSSAR
|
10 |
-
|
11 |
-
on:
|
12 |
-
push:
|
13 |
-
branches: [ "main" ]
|
14 |
-
pull_request:
|
15 |
-
branches: [ "main" ]
|
16 |
-
schedule:
|
17 |
-
- cron: '0 0 * * *'
|
18 |
-
|
19 |
-
permissions:
|
20 |
-
contents: read
|
21 |
-
|
22 |
-
jobs:
|
23 |
-
OSSAR-Scan:
|
24 |
-
permissions:
|
25 |
-
contents: read # for actions/checkout to fetch code
|
26 |
-
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
|
27 |
-
actions: read # required for a private repository by github/codeql-action/upload-sarif
|
28 |
-
runs-on: windows-latest
|
29 |
-
|
30 |
-
steps:
|
31 |
-
- name: Enable long paths in Git
|
32 |
-
run: git config --system core.longpaths true
|
33 |
-
|
34 |
-
- name: Checkout repository into short path
|
35 |
-
uses: actions/checkout@v4
|
36 |
-
with:
|
37 |
-
path: repo # Clones into a folder named "repo" to shorten paths
|
38 |
-
clean: true
|
39 |
-
fetch-depth: 1 # Fetch only the latest commit
|
40 |
-
|
41 |
-
# Uncomment the next step if you are using a self-hosted runner that does not have a compatible .NET version installed.
|
42 |
-
# - name: Install .NET
|
43 |
-
# uses: actions/setup-dotnet@v4
|
44 |
-
# with:
|
45 |
-
# dotnet-version: '3.1.x'
|
46 |
-
|
47 |
-
# Run open source static analysis tools
|
48 |
-
- name: Run OSSAR
|
49 |
-
uses: github/ossar-action@v1
|
50 |
-
id: ossar
|
51 |
-
|
52 |
-
# Upload results to the Security tab
|
53 |
-
- name: Upload OSSAR results
|
54 |
-
uses: github/codeql-action/upload-sarif@v3
|
55 |
-
with:
|
56 |
-
sarif_file: ${{ steps.ossar.outputs.sarifFile }}
|
57 |
-
|
58 |
-
# Added this to protect failed checks
|
59 |
-
- name: Fail on findings
|
60 |
-
if: steps.ossar.outputs.exit_code != '0'
|
61 |
-
run: exit 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app_main_hf.py
CHANGED
@@ -2,10 +2,10 @@ import os
|
|
2 |
import sys
|
3 |
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), )))
|
4 |
|
5 |
-
from streamlit_extras.bottom_container import bottom
|
6 |
-
from streamlit_extras.app_logo import add_logo
|
7 |
-
from streamlit_extras.add_vertical_space import add_vertical_space
|
8 |
-
from streamlit_extras.stylable_container import stylable_container
|
9 |
import torch
|
10 |
from imports import *
|
11 |
import streamlit as st
|
|
|
2 |
import sys
|
3 |
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), )))
|
4 |
|
5 |
+
# from streamlit_extras.bottom_container import bottom
|
6 |
+
# from streamlit_extras.app_logo import add_logo
|
7 |
+
# from streamlit_extras.add_vertical_space import add_vertical_space
|
8 |
+
# from streamlit_extras.stylable_container import stylable_container
|
9 |
import torch
|
10 |
from imports import *
|
11 |
import streamlit as st
|