Spaces:
Runtime error
Runtime error
added rm dist
Browse files
app.py
CHANGED
|
@@ -93,12 +93,14 @@ def button_click(hf_model_id, conv_template, quantization, oauth_token: gr.OAuth
|
|
| 93 |
" --quantization " + quantization + \
|
| 94 |
" -o dist/" + mlc_model_name], shell=True, capture_output=True, text=True)
|
| 95 |
if convert_weight_result.returncode != 0:
|
|
|
|
| 96 |
return convert_weight_result.stderr
|
| 97 |
|
| 98 |
gen_config_result = subprocess.run(["mlc_llm gen_config ./dist/models/" + model_dir_name + "/" + \
|
| 99 |
" --quantization " + quantization + " --conv-template " + conv_template + \
|
| 100 |
" -o dist/" + mlc_model_name + "/"], shell=True, capture_output=True, text=True)
|
| 101 |
if gen_config_result.returncode != 0:
|
|
|
|
| 102 |
return gen_config_result.stderr
|
| 103 |
|
| 104 |
# push to HF
|
|
|
|
| 93 |
" --quantization " + quantization + \
|
| 94 |
" -o dist/" + mlc_model_name], shell=True, capture_output=True, text=True)
|
| 95 |
if convert_weight_result.returncode != 0:
|
| 96 |
+
os.system("rm -rf dist/")
|
| 97 |
return convert_weight_result.stderr
|
| 98 |
|
| 99 |
gen_config_result = subprocess.run(["mlc_llm gen_config ./dist/models/" + model_dir_name + "/" + \
|
| 100 |
" --quantization " + quantization + " --conv-template " + conv_template + \
|
| 101 |
" -o dist/" + mlc_model_name + "/"], shell=True, capture_output=True, text=True)
|
| 102 |
if gen_config_result.returncode != 0:
|
| 103 |
+
os.system("rm -rf dist/")
|
| 104 |
return gen_config_result.stderr
|
| 105 |
|
| 106 |
# push to HF
|