Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -87,6 +87,7 @@ async def optimize_image(input_file, output_file, target_size_kb=200):
|
|
87 |
os.replace(temp_output_file, output_file)
|
88 |
|
89 |
async def mainFunction(html_content:str):
|
|
|
90 |
# Create img folder if not exists
|
91 |
if not os.path.exists('img'):
|
92 |
os.makedirs('img')
|
@@ -98,7 +99,7 @@ async def mainFunction(html_content:str):
|
|
98 |
# Write the HTML string to the file
|
99 |
with open(filename, 'w',encoding='utf-8') as file:
|
100 |
file.write(html_content)
|
101 |
-
|
102 |
template_loader = FileSystemLoader(searchpath=".")
|
103 |
template_env = Environment(loader=template_loader)
|
104 |
template = template_env.get_template(filename)
|
|
|
87 |
os.replace(temp_output_file, output_file)
|
88 |
|
89 |
async def mainFunction(html_content:str):
|
90 |
+
print("in main function")
|
91 |
# Create img folder if not exists
|
92 |
if not os.path.exists('img'):
|
93 |
os.makedirs('img')
|
|
|
99 |
# Write the HTML string to the file
|
100 |
with open(filename, 'w',encoding='utf-8') as file:
|
101 |
file.write(html_content)
|
102 |
+
print("html file created")
|
103 |
template_loader = FileSystemLoader(searchpath=".")
|
104 |
template_env = Environment(loader=template_loader)
|
105 |
template = template_env.get_template(filename)
|