Wauplin HF staff commited on
Commit
3d9edc0
1 Parent(s): b8352d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -163,7 +163,8 @@ def merge(yaml_config: str, hf_token: str, repo_name: str) -> Iterable[List[Log]
163
  yield runner.log(f"Error creating repo {e}", level="ERROR")
164
  return
165
 
166
- yield from runner.run_command(cli.split(), cwd=merged_path)
 
167
 
168
  if runner.exit_code != 0:
169
  yield runner.log("Merge failed. Deleting repo as no model is uploaded.", level="ERROR")
 
163
  yield runner.log(f"Error creating repo {e}", level="ERROR")
164
  return
165
 
166
+ # Set tmp HF_HOME to avoid filling up disk Space
167
+ yield from runner.run_command((f"HF_HOME='{tmpdirname}/.cache' " + cli).split(), cwd=merged_path)
168
 
169
  if runner.exit_code != 0:
170
  yield runner.log("Merge failed. Deleting repo as no model is uploaded.", level="ERROR")