silveroxides commited on
Commit
de0e007
·
verified ·
1 Parent(s): a56ba03

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -5,6 +5,9 @@ from huggingface_hub import hf_hub_download, HfApi
5
  from convert_to_quant import quantize
6
 
7
  @spaces.GPU(duration=300)
 
 
 
8
  def run_quantization(
9
  source_repo,
10
  source_file,
@@ -74,7 +77,7 @@ def run_quantization(
74
  yield f"Quantizing to {output_filename}...\nThis may take a few minutes.", ""
75
 
76
  # We need to print output or capture it, convert_to_quant probably prints. We'll just run it.
77
- quantize(**quant_args)
78
 
79
  yield f"Uploading {output_filename} to {target_repo}...", ""
80
 
 
5
  from convert_to_quant import quantize
6
 
7
  @spaces.GPU(duration=300)
8
+ def do_quantize(quant_args):
9
+ quantize(**quant_args)
10
+
11
  def run_quantization(
12
  source_repo,
13
  source_file,
 
77
  yield f"Quantizing to {output_filename}...\nThis may take a few minutes.", ""
78
 
79
  # We need to print output or capture it, convert_to_quant probably prints. We'll just run it.
80
+ do_quantize(quant_args)
81
 
82
  yield f"Uploading {output_filename} to {target_repo}...", ""
83