Akshayram1 commited on
Commit
cea10a0
·
verified ·
1 Parent(s): f9300e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -13,7 +13,7 @@ def load_model():
13
  # Extract text from image using SmolVLM
14
  def extract_text(image, processor, model):
15
  # Preprocess image
16
- inputs = processor(images=image, text="What is the text in this image?", return_tensors="pt")
17
 
18
  with torch.no_grad():
19
  outputs = model.generate(**inputs)
 
13
  # Extract text from image using SmolVLM
14
  def extract_text(image, processor, model):
15
  # Preprocess image
16
+ inputs = processor(images=image, text="What is the text in this image? extract all data in JSON format", return_tensors="pt")
17
 
18
  with torch.no_grad():
19
  outputs = model.generate(**inputs)