Ifeanyi commited on
Commit
42499f7
·
verified ·
1 Parent(s): 052d7c4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -24,9 +24,9 @@ def ImageStory(image: Union[np.ndarray, str, IO]) -> str:
24
 
25
  # check image file and convert to a PIL image
26
  if isinstance(image, np.ndarray):
27
- img = Image.fromarray(image)
28
  else:
29
- img = Image.open(image)
30
 
31
  response = model.generate_content(["write a short story about the image", img])
32
 
 
24
 
25
  # check image file and convert to a PIL image
26
  if isinstance(image, np.ndarray):
27
+ img = PIL.Image.fromarray(image)
28
  else:
29
+ img = PIL.Image.open(image)
30
 
31
  response = model.generate_content(["write a short story about the image", img])
32