sitammeur commited on
Commit
9d44387
·
verified ·
1 Parent(s): e96ebfa

Update src/app/response.py

Browse files
Files changed (1) hide show
  1. src/app/response.py +3 -2
src/app/response.py CHANGED
@@ -20,8 +20,8 @@ from src.logger import logging
20
  from src.exception import CustomExceptionHandling
21
 
22
 
23
- # Model and tokenizer
24
- model, tokenizer = load_model_and_tokenizer(model_name, device)
25
 
26
 
27
  @spaces.GPU(duration=120)
@@ -49,6 +49,7 @@ def describe_image(image: str, question: str) -> str:
49
  image=None,
50
  msgs=msgs,
51
  tokenizer=tokenizer,
 
52
  sampling=sampling,
53
  stream=stream,
54
  top_p=top_p,
 
20
  from src.exception import CustomExceptionHandling
21
 
22
 
23
+ # Model, tokenizer and processor
24
+ model, tokenizer, processor = load_model_and_tokenizer(model_name, device)
25
 
26
 
27
  @spaces.GPU(duration=120)
 
49
  image=None,
50
  msgs=msgs,
51
  tokenizer=tokenizer,
52
+ processor=processor,
53
  sampling=sampling,
54
  stream=stream,
55
  top_p=top_p,