Commit ·
a2f9429
1
Parent(s): 21f25c7
Update app.py
Browse files
app.py
CHANGED
|
@@ -297,8 +297,8 @@ def train(*inputs):
|
|
| 297 |
torch.cuda.empty_cache()
|
| 298 |
if(which_model == "v1-5"):
|
| 299 |
print("Adding Safety Checker to the model...")
|
| 300 |
-
shutil.copytree(f"{safety_checker}/feature_extractor", "output_model/feature_extractor")
|
| 301 |
-
shutil.copytree(f"{safety_checker}/safety_checker", "output_model/safety_checker")
|
| 302 |
shutil.copy(f"model_index.json", "output_model/model_index.json")
|
| 303 |
|
| 304 |
if(not remove_attribution_after):
|
|
|
|
| 297 |
torch.cuda.empty_cache()
|
| 298 |
if(which_model == "v1-5"):
|
| 299 |
print("Adding Safety Checker to the model...")
|
| 300 |
+
shutil.copytree(f"{safety_checker}/feature_extractor", "output_model/feature_extractor", dirs_exist_ok=True)
|
| 301 |
+
shutil.copytree(f"{safety_checker}/safety_checker", "output_model/safety_checker", dirs_exist_ok=True)
|
| 302 |
shutil.copy(f"model_index.json", "output_model/model_index.json")
|
| 303 |
|
| 304 |
if(not remove_attribution_after):
|