mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
404 on missing file
This commit is contained in:
parent
ab131cb55e
commit
72a9d75330
@ -9,17 +9,20 @@ model = T2I()
|
||||
|
||||
class DreamServer(BaseHTTPRequestHandler):
|
||||
def do_GET(self):
|
||||
self.send_response(200)
|
||||
if self.path == "/":
|
||||
self.send_response(200)
|
||||
self.send_header("Content-type", "text/html")
|
||||
self.end_headers()
|
||||
with open("./scripts/static/index.html", "rb") as content:
|
||||
self.wfile.write(content.read())
|
||||
else:
|
||||
elif os.path.exists("." + self.path):
|
||||
self.send_response(200)
|
||||
self.send_header("Content-type", "image/png")
|
||||
self.end_headers()
|
||||
with open("." + self.path, "rb") as content:
|
||||
self.wfile.write(content.read())
|
||||
else:
|
||||
self.send_response(404)
|
||||
|
||||
def do_POST(self):
|
||||
self.send_response(200)
|
||||
|
Loading…
Reference in New Issue
Block a user