newoz commited on
Commit
a6861cf
·
1 Parent(s): 67bf68b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -97,7 +97,10 @@ if uploaded_file is not None:
97
  image_bytes = query({
98
  "inputs": 'A picture without text about: ' + summary[0]['summary_text']
99
  })
100
- image = Image.open(io.BytesIO(image_bytes))
 
 
 
101
  temp_img_path = tempfile.NamedTemporaryFile(delete=False, suffix=".png").name
102
  image.save(temp_img_path)
103
 
 
97
  image_bytes = query({
98
  "inputs": 'A picture without text about: ' + summary[0]['summary_text']
99
  })
100
+ image_width = 800 # Set the desired width
101
+ image_height = 600 # Set the desired height
102
+ image = Image.open(io.BytesIO(image_bytes)).resize((image_width, image_height))
103
+
104
  temp_img_path = tempfile.NamedTemporaryFile(delete=False, suffix=".png").name
105
  image.save(temp_img_path)
106