mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-04-16 19:27:18 +02:00
Remember to actually import "Response" from flask
This commit is contained in:
parent
4e9b371564
commit
b5d9aaf785
@ -370,7 +370,7 @@ log.setLevel(logging.ERROR)
|
|||||||
|
|
||||||
# Start flask & SocketIO
|
# Start flask & SocketIO
|
||||||
print("{0}Initializing Flask... {1}".format(colors.PURPLE, colors.END), end="")
|
print("{0}Initializing Flask... {1}".format(colors.PURPLE, colors.END), end="")
|
||||||
from flask import Flask, render_template
|
from flask import Flask, render_template, Response
|
||||||
from flask_socketio import SocketIO, emit
|
from flask_socketio import SocketIO, emit
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
app.config['SECRET KEY'] = 'secret!'
|
app.config['SECRET KEY'] = 'secret!'
|
||||||
@ -523,7 +523,7 @@ def download():
|
|||||||
"selective": wi["selective"],
|
"selective": wi["selective"],
|
||||||
"constant": wi["constant"]
|
"constant": wi["constant"]
|
||||||
})
|
})
|
||||||
save = flask.Response(json.dumps(js, indent=3))
|
save = Response(json.dumps(js, indent=3))
|
||||||
save.headers.set('Content-Disposition', 'attachment', filename='%s.json' % path.basename(vars.savedir))
|
save.headers.set('Content-Disposition', 'attachment', filename='%s.json' % path.basename(vars.savedir))
|
||||||
return(save)
|
return(save)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user