broadfield-dev commited on
Commit
b9b6447
·
verified ·
1 Parent(s): 258ad5d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -106,6 +106,7 @@ def create_hf_space():
106
  #for line in content_lines:
107
  # content += line + "\n"
108
  # Write content to a temporary file
 
109
  with open(f"temp_{filename}", "w") as f:
110
  '''content=""
111
  if filename.endswith(".py"):
@@ -115,10 +116,14 @@ def create_hf_space():
115
  for line in content_box:
116
  f.write(line + "\n")
117
  else:'''
 
118
  content_box = list(content.split("\n"))
 
119
  for line in content_box:
120
- print(line)
121
- f.write(line + "\n")
 
 
122
  f.close()
123
 
124
  #if filename.endswith(".py"):
 
106
  #for line in content_lines:
107
  # content += line + "\n"
108
  # Write content to a temporary file
109
+ output=""
110
  with open(f"temp_{filename}", "w") as f:
111
  '''content=""
112
  if filename.endswith(".py"):
 
116
  for line in content_box:
117
  f.write(line + "\n")
118
  else:'''
119
+ print(content)
120
  content_box = list(content.split("\n"))
121
+ print(content_box)
122
  for line in content_box:
123
+ output+=line + "\n"
124
+
125
+
126
+ f.write(output)
127
  f.close()
128
 
129
  #if filename.endswith(".py"):