Spaces:
Running
Running
update description
Browse files
app.py
CHANGED
@@ -107,7 +107,7 @@ def quantize_model(
|
|
107 |
quant_method=quant_method,
|
108 |
dataset=None if quant_method=="default" else calibration_dataset,
|
109 |
ratio=1.0 if is_int8 else ratio,
|
110 |
-
num_samples=50,
|
111 |
)
|
112 |
|
113 |
api = HfApi(token=oauth_token.token)
|
@@ -195,7 +195,7 @@ def quantize_model(
|
|
195 |
path_in_repo="README.md",
|
196 |
repo_id=new_repo_id,
|
197 |
)
|
198 |
-
return f"This model was successfully quantized, find it under your repo {new_repo_url}
|
199 |
finally:
|
200 |
shutil.rmtree(folder, ignore_errors=True)
|
201 |
except Exception as e:
|
@@ -261,7 +261,7 @@ private_repo = gr.Checkbox(
|
|
261 |
overwritte = gr.Checkbox(
|
262 |
value=False,
|
263 |
label="Overwrite repo content",
|
264 |
-
info="
|
265 |
)
|
266 |
interface = gr.Interface(
|
267 |
fn=quantize_model,
|
|
|
107 |
quant_method=quant_method,
|
108 |
dataset=None if quant_method=="default" else calibration_dataset,
|
109 |
ratio=1.0 if is_int8 else ratio,
|
110 |
+
num_samples=None if quant_method=="default" else 50,
|
111 |
)
|
112 |
|
113 |
api = HfApi(token=oauth_token.token)
|
|
|
195 |
path_in_repo="README.md",
|
196 |
repo_id=new_repo_id,
|
197 |
)
|
198 |
+
return f"This model was successfully quantized, find it under your repo {new_repo_url}"
|
199 |
finally:
|
200 |
shutil.rmtree(folder, ignore_errors=True)
|
201 |
except Exception as e:
|
|
|
261 |
overwritte = gr.Checkbox(
|
262 |
value=False,
|
263 |
label="Overwrite repo content",
|
264 |
+
info="Enable pushing files on existing repo, potentially overwriting existing files",
|
265 |
)
|
266 |
interface = gr.Interface(
|
267 |
fn=quantize_model,
|