broadfield-dev commited on
Commit
8aaffcc
·
verified ·
1 Parent(s): 71a1f86

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -110,12 +110,12 @@ def create_hf_space():
110
  if filename.endswith(".py"):
111
  # Inject parameters into Python files if present
112
  #content = f"PARAMS = {json.dumps(params)}\n\n{content}"
113
- content = f"{content}"
114
-
115
- f.write(content)
116
  f.close()
117
- if filename.endswith(".py"):
118
- os.system(f"black temp_{filename}")
119
  # Upload to the new Space
120
  try:
121
  api.upload_file(
 
110
  if filename.endswith(".py"):
111
  # Inject parameters into Python files if present
112
  #content = f"PARAMS = {json.dumps(params)}\n\n{content}"
113
+ content = content.readlines()
114
+ for line in content:
115
+ f.write(content)
116
  f.close()
117
+ #if filename.endswith(".py"):
118
+ # os.system(f"black temp_{filename}")
119
  # Upload to the new Space
120
  try:
121
  api.upload_file(