Spaces:
Runtime error
Runtime error
Commit
·
64ab7c4
1
Parent(s):
61f8100
test
Browse files
app.py
CHANGED
|
@@ -25,11 +25,11 @@ def generate_and_save_image(prompt, negative_prompt=''):
|
|
| 25 |
|
| 26 |
# Generate a unique UUID for the filename
|
| 27 |
unique_id = str(uuid.uuid4())
|
| 28 |
-
image_path = f"generated_images/{unique_id}.
|
| 29 |
|
| 30 |
# Save generated image locally
|
| 31 |
os.makedirs('generated_images', exist_ok=True)
|
| 32 |
-
image.save(image_path, format='
|
| 33 |
|
| 34 |
# Return the path of the saved image to display in Gradio interface
|
| 35 |
return image_path
|
|
|
|
| 25 |
|
| 26 |
# Generate a unique UUID for the filename
|
| 27 |
unique_id = str(uuid.uuid4())
|
| 28 |
+
image_path = f"generated_images/{unique_id}.jpeg"
|
| 29 |
|
| 30 |
# Save generated image locally
|
| 31 |
os.makedirs('generated_images', exist_ok=True)
|
| 32 |
+
image.save(image_path, format='JPEG')
|
| 33 |
|
| 34 |
# Return the path of the saved image to display in Gradio interface
|
| 35 |
return image_path
|