mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-21 02:19:59 +08:00
flask static fix, add text to image input
This commit is contained in:
parent
12f8d8fbf6
commit
ad47ea45a1
@ -88,7 +88,7 @@ def main():
|
|||||||
def static(path):
|
def static(path):
|
||||||
path = os.path.join(STATIC_PATH_LIB, path)
|
path = os.path.join(STATIC_PATH_LIB, path)
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
return send_file()
|
return send_file(path)
|
||||||
else:
|
else:
|
||||||
abort(404)
|
abort(404)
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
.canvas_holder {
|
.canvas_holder {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: calc(100% - 36px);
|
||||||
}
|
}
|
||||||
.saliency_holder {
|
.saliency_holder {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -122,7 +122,7 @@ const image_input = {
|
|||||||
find(".image_editor")[0], {
|
find(".image_editor")[0], {
|
||||||
includeUI: {
|
includeUI: {
|
||||||
menuBarPosition: 'left',
|
menuBarPosition: 'left',
|
||||||
menu: ['crop', 'flip', 'rotate', 'draw', 'filter']
|
menu: ['crop', 'flip', 'rotate', 'draw', 'filter', 'text']
|
||||||
},
|
},
|
||||||
cssMaxWidth: 700,
|
cssMaxWidth: 700,
|
||||||
cssMaxHeight: 500,
|
cssMaxHeight: 500,
|
||||||
|
@ -88,7 +88,7 @@ def main():
|
|||||||
def static(path):
|
def static(path):
|
||||||
path = os.path.join(STATIC_PATH_LIB, path)
|
path = os.path.join(STATIC_PATH_LIB, path)
|
||||||
if os.path.exists(path):
|
if os.path.exists(path):
|
||||||
return send_file()
|
return send_file(path)
|
||||||
else:
|
else:
|
||||||
abort(404)
|
abort(404)
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
.canvas_holder {
|
.canvas_holder {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: calc(100% - 36px);
|
||||||
}
|
}
|
||||||
.saliency_holder {
|
.saliency_holder {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -122,7 +122,7 @@ const image_input = {
|
|||||||
find(".image_editor")[0], {
|
find(".image_editor")[0], {
|
||||||
includeUI: {
|
includeUI: {
|
||||||
menuBarPosition: 'left',
|
menuBarPosition: 'left',
|
||||||
menu: ['crop', 'flip', 'rotate', 'draw', 'filter']
|
menu: ['crop', 'flip', 'rotate', 'draw', 'filter', 'text']
|
||||||
},
|
},
|
||||||
cssMaxWidth: 700,
|
cssMaxWidth: 700,
|
||||||
cssMaxHeight: 500,
|
cssMaxHeight: 500,
|
||||||
|
Loading…
Reference in New Issue
Block a user