ravi-vc commited on
Commit
748f1ca
·
verified ·
1 Parent(s): 59bf645

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -20,6 +20,7 @@ model.to(device)
20
  def extract_chart_data(img: Image.Image, header_text:str):
21
  # Provide a header prompt for VQA
22
  # header_text = "Convert this bar chart into a table of quarter and cost values"
 
23
 
24
  inputs = processor(images=img, text=header_text, return_tensors="pt").to(device)
25
  outputs = model.generate(**inputs)
@@ -39,7 +40,7 @@ iface = gr.Interface(
39
  ) # Text input
40
  ],
41
  outputs="text",
42
- title="DePlot Chart Data Extractor 2",
43
  description="Upload a chart image and get its extracted data/description."
44
  )
45
 
 
20
  def extract_chart_data(img: Image.Image, header_text:str):
21
  # Provide a header prompt for VQA
22
  # header_text = "Convert this bar chart into a table of quarter and cost values"
23
+ print("Header text:", header_text)
24
 
25
  inputs = processor(images=img, text=header_text, return_tensors="pt").to(device)
26
  outputs = model.generate(**inputs)
 
40
  ) # Text input
41
  ],
42
  outputs="text",
43
+ title="DePlot Chart Data Extractor 1",
44
  description="Upload a chart image and get its extracted data/description."
45
  )
46