Update app.py
Browse files
app.py
CHANGED
|
@@ -19,7 +19,7 @@ model.to(device)
|
|
| 19 |
|
| 20 |
def extract_chart_data(img: Image.Image):
|
| 21 |
# Provide a header prompt for VQA
|
| 22 |
-
header_text = "Extract
|
| 23 |
|
| 24 |
inputs = processor(images=img, text=header_text, return_tensors="pt").to(device)
|
| 25 |
outputs = model.generate(**inputs)
|
|
@@ -32,7 +32,7 @@ iface = gr.Interface(
|
|
| 32 |
fn=extract_chart_data,
|
| 33 |
inputs=gr.Image(type="pil"),
|
| 34 |
outputs="text",
|
| 35 |
-
title="DePlot Chart Data Extractor
|
| 36 |
description="Upload a chart image and get its extracted data/description."
|
| 37 |
)
|
| 38 |
|
|
|
|
| 19 |
|
| 20 |
def extract_chart_data(img: Image.Image):
|
| 21 |
# Provide a header prompt for VQA
|
| 22 |
+
header_text = "Extract dataset for the given area chart"
|
| 23 |
|
| 24 |
inputs = processor(images=img, text=header_text, return_tensors="pt").to(device)
|
| 25 |
outputs = model.generate(**inputs)
|
|
|
|
| 32 |
fn=extract_chart_data,
|
| 33 |
inputs=gr.Image(type="pil"),
|
| 34 |
outputs="text",
|
| 35 |
+
title="DePlot Chart Data Extractor 3",
|
| 36 |
description="Upload a chart image and get its extracted data/description."
|
| 37 |
)
|
| 38 |
|