Spaces:
Runtime error
Runtime error
Commit
·
a03a4af
1
Parent(s):
ca069cd
remove cuda call in app
Browse files
app.py
CHANGED
|
@@ -24,7 +24,7 @@ model_compiled = torch.compile(model, mode="reduce-overhead")
|
|
| 24 |
|
| 25 |
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
| 26 |
image = Image.open(requests.get(url, stream=True).raw)
|
| 27 |
-
inputs = processor(images=image, return_tensors="pt").to(
|
| 28 |
|
| 29 |
print("Compiling model...")
|
| 30 |
start_time = time.time()
|
|
|
|
| 24 |
|
| 25 |
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
|
| 26 |
image = Image.open(requests.get(url, stream=True).raw)
|
| 27 |
+
inputs = processor(images=image, return_tensors="pt").to(device).to(torch.float16)
|
| 28 |
|
| 29 |
print("Compiling model...")
|
| 30 |
start_time = time.time()
|