echarlaix HF staff commited on
Commit
6bdca2e
1 Parent(s): 0b6f7c1

add nncf tag

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -115,7 +115,7 @@ def quantize_model(
115
 
116
  api = HfApi(token=oauth_token.token)
117
  if api.repo_exists(new_repo_id) and not overwritte:
118
- return f"Model {new_repo_id} already exist, please set overwritte=True to push on an existing repository"
119
 
120
  with TemporaryDirectory() as d:
121
  folder = os.path.join(d, repo_folder_name(repo_id=model_id, repo_type="models"))
@@ -169,7 +169,9 @@ def quantize_model(
169
  if card.data.tags is None:
170
  card.data.tags = []
171
  card.data.tags.append("openvino")
 
172
  card.data.base_model = model_id
 
173
  card.text = dedent(
174
  f"""
175
  This model is a quantized version of [`{model_id}`](https://huggingface.co/{model_id}) and is converted to the OpenVINO format. This model was obtained via the [nncf-quantization](https://huggingface.co/spaces/echarlaix/nncf-quantization) space with [optimum-intel](https://github.com/huggingface/optimum-intel).
 
115
 
116
  api = HfApi(token=oauth_token.token)
117
  if api.repo_exists(new_repo_id) and not overwritte:
118
+ return f"Model {new_repo_id} already exist, please tick the overwritte box to push on an existing repository"
119
 
120
  with TemporaryDirectory() as d:
121
  folder = os.path.join(d, repo_folder_name(repo_id=model_id, repo_type="models"))
 
169
  if card.data.tags is None:
170
  card.data.tags = []
171
  card.data.tags.append("openvino")
172
+ card.data.tags.append("nncf")
173
  card.data.base_model = model_id
174
+
175
  card.text = dedent(
176
  f"""
177
  This model is a quantized version of [`{model_id}`](https://huggingface.co/{model_id}) and is converted to the OpenVINO format. This model was obtained via the [nncf-quantization](https://huggingface.co/spaces/echarlaix/nncf-quantization) space with [optimum-intel](https://github.com/huggingface/optimum-intel).