Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -17,7 +17,7 @@ processor = AutoProcessor.from_pretrained("ahmed-masry/ChartInstruct-LLama2")
|
|
| 17 |
@spaces.GPU
|
| 18 |
def predict(image, input_text):
|
| 19 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 20 |
-
model
|
| 21 |
|
| 22 |
input_prompt = f"<image>\n Question: {input_text} Answer: "
|
| 23 |
image = image.convert("RGB")
|
|
|
|
| 17 |
@spaces.GPU
|
| 18 |
def predict(image, input_text):
|
| 19 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
| 20 |
+
model.to(device)
|
| 21 |
|
| 22 |
input_prompt = f"<image>\n Question: {input_text} Answer: "
|
| 23 |
image = image.convert("RGB")
|