Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -33,10 +33,10 @@ async def generate(
|
|
| 33 |
# out = model.generate(**inputs)
|
| 34 |
# caption = processor.decode(out[0], skip_special_tokens=True)
|
| 35 |
|
| 36 |
-
with open("temp_input.jpg", "wb") as f:
|
| 37 |
f.write(await image.read())
|
| 38 |
|
| 39 |
-
caption = extract_face_prompt("temp_input.jpg")
|
| 40 |
|
| 41 |
# 16. Construct the DALL路E prompt using the style and the caption
|
| 42 |
prompt = (
|
|
|
|
| 33 |
# out = model.generate(**inputs)
|
| 34 |
# caption = processor.decode(out[0], skip_special_tokens=True)
|
| 35 |
|
| 36 |
+
with open("/tmp/temp_input.jpg", "wb") as f:
|
| 37 |
f.write(await image.read())
|
| 38 |
|
| 39 |
+
caption = extract_face_prompt("/tmp/temp_input.jpg")
|
| 40 |
|
| 41 |
# 16. Construct the DALL路E prompt using the style and the caption
|
| 42 |
prompt = (
|