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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -110,9 +110,9 @@ 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 = 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}")
 
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 = list(content.split("\n")
114
  for line in content:
115
+ f.write(line + "\n")
116
  f.close()
117
  #if filename.endswith(".py"):
118
  # os.system(f"black temp_{filename}")