sitammeur commited on
Commit
f354a1f
1 Parent(s): bc54d85

Update src/app/response.py

Browse files
Files changed (1) hide show
  1. src/app/response.py +0 -2
src/app/response.py CHANGED
@@ -1,7 +1,6 @@
1
  # Necessary imports
2
  import sys
3
  import PIL.Image
4
- from PIL import Image
5
  import torch
6
  import gradio as gr
7
  import spaces
@@ -37,7 +36,6 @@ def caption_image(image: PIL.Image.Image, max_new_tokens: int, sampling: bool) -
37
 
38
  # Prepare the inputs
39
  prompt = "caption en"
40
- image = Image.open(image).resize((448, 448))
41
  model_inputs = (
42
  processor(text=prompt, images=image, return_tensors="pt")
43
  .to(torch.bfloat16)
 
1
  # Necessary imports
2
  import sys
3
  import PIL.Image
 
4
  import torch
5
  import gradio as gr
6
  import spaces
 
36
 
37
  # Prepare the inputs
38
  prompt = "caption en"
 
39
  model_inputs = (
40
  processor(text=prompt, images=image, return_tensors="pt")
41
  .to(torch.bfloat16)