Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -32,9 +32,9 @@ def process(prompt):
|
|
32 |
print(time)
|
33 |
time = time.replace(".", "").replace(":","")
|
34 |
image = client.text_to_image(response)
|
35 |
-
image.save("outputs/images/" + time)
|
36 |
with open("outputs/" + time + ".json", "wb") as f:
|
37 |
-
f.write({"prompt": prompt, "refined_prompt": response, "image": "outputs/images/" + time})
|
38 |
return image
|
39 |
|
40 |
# Create a Gradio Blocks app
|
|
|
32 |
print(time)
|
33 |
time = time.replace(".", "").replace(":","")
|
34 |
image = client.text_to_image(response)
|
35 |
+
image.save("outputs/images/" + time + ".png")
|
36 |
with open("outputs/" + time + ".json", "wb") as f:
|
37 |
+
f.write({"prompt": prompt, "refined_prompt": response, "image": "outputs/images/" + time + ".png"})
|
38 |
return image
|
39 |
|
40 |
# Create a Gradio Blocks app
|