Spaces:
Sleeping
Sleeping
Muhammad Waqas
commited on
Commit
·
191a9de
1
Parent(s):
1d48d75
Added: Generate image to video
Browse files- app.py +1 -2
- templates/home.html +1 -1
app.py
CHANGED
@@ -189,6 +189,7 @@ def generate_image():
|
|
189 |
|
190 |
return jsonify({'images': output_images_base64})
|
191 |
|
|
|
192 |
@app.route('/get_image/<filename>', methods=['GET'])
|
193 |
def get_image_file(filename):
|
194 |
return send_file(filename, mimetype='image/png')
|
@@ -198,8 +199,6 @@ def get_image_file(filename):
|
|
198 |
def image_to_video():
|
199 |
data = request.json
|
200 |
|
201 |
-
print(data)
|
202 |
-
|
203 |
# Extract token from headers
|
204 |
token = request.headers.get('Authorization')
|
205 |
if token is None:
|
|
|
189 |
|
190 |
return jsonify({'images': output_images_base64})
|
191 |
|
192 |
+
# Get image route
|
193 |
@app.route('/get_image/<filename>', methods=['GET'])
|
194 |
def get_image_file(filename):
|
195 |
return send_file(filename, mimetype='image/png')
|
|
|
199 |
def image_to_video():
|
200 |
data = request.json
|
201 |
|
|
|
|
|
202 |
# Extract token from headers
|
203 |
token = request.headers.get('Authorization')
|
204 |
if token is None:
|
templates/home.html
CHANGED
@@ -45,7 +45,7 @@
|
|
45 |
<body>
|
46 |
<h1>Welcome to ComfyUI API Interface!</h1>
|
47 |
<p>Use the API to generate images based on your prompts.</p>
|
48 |
-
<a href="/generate_image" target="_blank">Generate Image</a>
|
49 |
</body>
|
50 |
</html>
|
51 |
</title>
|
|
|
45 |
<body>
|
46 |
<h1>Welcome to ComfyUI API Interface!</h1>
|
47 |
<p>Use the API to generate images based on your prompts.</p>
|
48 |
+
<a href="/generate_image" target="_blank">Generate Image/Video</a>
|
49 |
</body>
|
50 |
</html>
|
51 |
</title>
|