Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
121 |
-
|
|
|
|
|
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"):
|