Update app.py
Browse files
app.py
CHANGED
|
@@ -264,8 +264,14 @@ def infer():
|
|
| 264 |
blend2 = Image.open('raw_frame2.jpg')
|
| 265 |
blend2 = Image.blend(res,blend2,0.5)
|
| 266 |
blend2.save("blended2.jpg")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 267 |
|
| 268 |
-
return "done", "predicted_flow.jpg", ["flofile.flo"], "diffused_input1.jpg",
|
| 269 |
####################################
|
| 270 |
# Bonus: Creating GIFs of predicted flows
|
| 271 |
# ---------------------------------------
|
|
|
|
| 264 |
blend2 = Image.open('raw_frame2.jpg')
|
| 265 |
blend2 = Image.blend(res,blend2,0.5)
|
| 266 |
blend2.save("blended2.jpg")
|
| 267 |
+
|
| 268 |
+
pil2diff_img = Image.open("blended2.jpg")
|
| 269 |
+
diffused_img = generate_images(pil2diff_img, prompt)
|
| 270 |
+
print(f"DIFFUSED IMG: {diffused_img[1]}")
|
| 271 |
+
|
| 272 |
+
diffused_img[1].save("diffused_blended_2.jpg")
|
| 273 |
|
| 274 |
+
return "done", "predicted_flow.jpg", ["flofile.flo"], "diffused_input1.jpg", "diffused_blended_2.jpg", 'wraped.jpg', "blended2.jpg"
|
| 275 |
####################################
|
| 276 |
# Bonus: Creating GIFs of predicted flows
|
| 277 |
# ---------------------------------------
|