mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 02:24:59 +00:00
fix(ci): fixup checksum scanning pipeline (#3631)
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
parent
4edd8c80b4
commit
3e8e71f8b6
1 changed files with 8 additions and 3 deletions
5
.github/check_and_update.py
vendored
5
.github/check_and_update.py
vendored
|
@ -29,8 +29,13 @@ def calculate_sha256(file_path):
|
||||||
def manual_safety_check_hf(repo_id):
|
def manual_safety_check_hf(repo_id):
|
||||||
scanResponse = requests.get('https://huggingface.co/api/models/' + repo_id + "/scan")
|
scanResponse = requests.get('https://huggingface.co/api/models/' + repo_id + "/scan")
|
||||||
scan = scanResponse.json()
|
scan = scanResponse.json()
|
||||||
|
# Check if 'hasUnsafeFile' exists in the response
|
||||||
|
if 'hasUnsafeFile' in scan:
|
||||||
if scan['hasUnsafeFile']:
|
if scan['hasUnsafeFile']:
|
||||||
return scan
|
return scan
|
||||||
|
else:
|
||||||
|
return None
|
||||||
|
else:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
download_type, repo_id_or_url = parse_uri(uri)
|
download_type, repo_id_or_url = parse_uri(uri)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue