mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-01-13 12:10:18 +00:00
py: remove license_content from metadata heuristics and add additional license file checks
This commit is contained in:
parent
d79e8e12ff
commit
928aa66a92
@ -381,7 +381,6 @@ class Metadata:
|
||||
use_model_card_metadata("license", "license")
|
||||
use_model_card_metadata("license_name", "license_name")
|
||||
use_model_card_metadata("license_link", "license_link")
|
||||
use_model_card_metadata("license_content", "license_content")
|
||||
|
||||
use_array_model_card_metadata("tags", "tags")
|
||||
use_array_model_card_metadata("tags", "pipeline_tag")
|
||||
@ -436,6 +435,7 @@ class Metadata:
|
||||
|
||||
# Detect LICENSE file and include a copy
|
||||
#########################################
|
||||
if isinstance(metadata.license_link, str) and not (metadata.license_link.startswith("http://") or metadata.license_link.startswith("https://")):
|
||||
if metadata.license_content is None:
|
||||
standard_license_file_path = Path("LICENSE")
|
||||
if standard_license_file_path.is_file():
|
||||
|
Loading…
Reference in New Issue
Block a user