akshayka commited on
Commit
945893c
·
verified ·
1 Parent(s): 2ab8567

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -53,9 +53,7 @@ def __():
53
  "https://upload.wikimedia.org/wikipedia/en/d/dd/The_Persistence_of_Memory.jpg"
54
  ).content
55
 
56
- with open(input_image, "wb") as handler:
57
- handler.write(img_data)
58
- return handler, img_data, input_image, requests
59
 
60
 
61
  @app.cell(hide_code=True)
@@ -82,9 +80,8 @@ def __():
82
 
83
  @app.cell
84
  def __(efficient_seam_carve, input_image, mo, slider):
85
- with mo.persistent_cache("seam_carves"):
86
- scale_factor = slider.value
87
- result = efficient_seam_carve(input_image, scale_factor)
88
 
89
  mo.hstack([mo.image(input_image), mo.image(result)], justify="start")
90
  return result, scale_factor
 
53
  "https://upload.wikimedia.org/wikipedia/en/d/dd/The_Persistence_of_Memory.jpg"
54
  ).content
55
 
56
+ return img_data, input_image, requests
 
 
57
 
58
 
59
  @app.cell(hide_code=True)
 
80
 
81
  @app.cell
82
  def __(efficient_seam_carve, input_image, mo, slider):
83
+ scale_factor = slider.value
84
+ result = efficient_seam_carve(input_image, scale_factor)
 
85
 
86
  mo.hstack([mo.image(input_image), mo.image(result)], justify="start")
87
  return result, scale_factor