Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -111,15 +111,7 @@ def generate_image(
|
|
| 111 |
progress(1.0, desc="Saved!")
|
| 112 |
|
| 113 |
return str(file_path)
|
| 114 |
-
|
| 115 |
-
tmp_file = tempfile.NamedTemporaryFile(suffix=".png", delete=False)
|
| 116 |
-
image.save(tmp_file, format="PNG")
|
| 117 |
-
tmp_file.close()
|
| 118 |
-
|
| 119 |
-
progress(1.0, desc="Complete!")
|
| 120 |
-
|
| 121 |
-
# Return the temp file path for Gradio type="filepath"
|
| 122 |
-
return tmp_file.name
|
| 123 |
|
| 124 |
|
| 125 |
except Exception as e:
|
|
|
|
| 111 |
progress(1.0, desc="Saved!")
|
| 112 |
|
| 113 |
return str(file_path)
|
| 114 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
|
| 116 |
|
| 117 |
except Exception as e:
|