Skip to content

Commit

Permalink
šŸ§¬šŸŖ ā† Planet generator now running when requested by #16, returns imagā€¦
Browse files Browse the repository at this point in the history
ā€¦e as request for #18
  • Loading branch information
Gizmotronn committed Mar 17, 2023
1 parent e3b9261 commit d3bdb1b
Show file tree
Hide file tree
Showing 15 changed files with 1,016 additions and 107 deletions.
Binary file modified .DS_Store
Binary file not shown.
16 changes: 13 additions & 3 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from flask import Flask, request, make_response, jsonify, Blueprint
from flask import Flask, request, make_response, jsonify, Blueprint, send_file
from flask_cors import CORS, cross_origin
from supabase_py import client, create_client

Expand All @@ -8,7 +8,9 @@
from .datastore import supabase, find_all_planets, add_planet_to_DB
# from Generator import gen_image # add this to a blueprint

from views import main
from .views import main

from .main import gen_image

# Flask application/container initialisation
app = Flask(__name__)
Expand All @@ -18,9 +20,17 @@
CORS(app)

if __name__ == '__main__':
for seed in range(0, 10):
gen_image(seed)
app.run(debug = True)


@app.route('/', methods=['GET', 'POST'])
def index():
return 'hello world'
for seed in range(0, 10):
gen_image(seed)
return 'hello world'

@app.route('/get_image')
def get_image():
return send_file('out0.png', mimetype='image/png')
2 changes: 0 additions & 2 deletions app/.flaskenv

This file was deleted.

11 changes: 0 additions & 11 deletions app/Dockerfile

This file was deleted.

59 changes: 0 additions & 59 deletions app/app.py

This file was deleted.

29 changes: 0 additions & 29 deletions app/docker-compose.yml

This file was deleted.

3 changes: 0 additions & 3 deletions app/requirements.txt

This file was deleted.

Loading

1 comment on commit d3bdb1b

@Gizmotronn
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.