Spaces:
Runtime error
Runtime error
Add html2image package.
Browse files- app.py +1 -1
- requirements.txt +1 -0
app.py
CHANGED
@@ -252,7 +252,7 @@ def html_to_png(card_name, html):
|
|
252 |
try:
|
253 |
css = ['./css/mana.css', './css/keyrune.css',
|
254 |
'./css/mtg_custom.css']
|
255 |
-
imgkit.from_string(html, path, {"xvfb": "", "enable-local-file-access": ""
|
256 |
except Exception as e:
|
257 |
print("ImgKit Error:")
|
258 |
print(e)
|
|
|
252 |
try:
|
253 |
css = ['./css/mana.css', './css/keyrune.css',
|
254 |
'./css/mtg_custom.css']
|
255 |
+
imgkit.from_string(html, path, {"xvfb": "", "enable-local-file-access": ""}, css=css)
|
256 |
except Exception as e:
|
257 |
print("ImgKit Error:")
|
258 |
print(e)
|
requirements.txt
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
accelerate
|
|
|
2 |
ftfy
|
3 |
gradio-client
|
4 |
torch
|
|
|
1 |
accelerate
|
2 |
+
html2image
|
3 |
ftfy
|
4 |
gradio-client
|
5 |
torch
|