martynka commited on
Commit
a52e5c4
·
verified ·
1 Parent(s): 1ebc983

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -44,7 +44,11 @@ def generate_image_and_upload(prompt: str) -> str:
44
  return upload_to_chevereto(img_path) # Upload and return URL
45
  else:
46
  return "Error: Model did not return a valid image"
47
-
 
 
 
 
48
  @app.route("/generate", methods=["POST"])
49
  def generate():
50
  """API Endpoint: Generate an image from a text prompt and upload it."""
 
44
  return upload_to_chevereto(img_path) # Upload and return URL
45
  else:
46
  return "Error: Model did not return a valid image"
47
+ @app.route("/", methods=["GET"])
48
+ def index():
49
+ """Renders the Star Trek-themed UI."""
50
+ return render_template("index.html")
51
+
52
  @app.route("/generate", methods=["POST"])
53
  def generate():
54
  """API Endpoint: Generate an image from a text prompt and upload it."""