Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,8 +34,7 @@ inv_normalize = transforms.Normalize(
|
|
| 34 |
|
| 35 |
# Gradio app interface
|
| 36 |
def classify_image(inp, transperancy=0.8):
|
| 37 |
-
|
| 38 |
-
#input_tensor = preprocess(image)
|
| 39 |
input_tensor = preprocess(inp)
|
| 40 |
input_batch = input_tensor.unsqueeze(0).to('cpu') # Create a batch
|
| 41 |
|
|
|
|
| 34 |
|
| 35 |
# Gradio app interface
|
| 36 |
def classify_image(inp, transperancy=0.8):
|
| 37 |
+
model.to("cpu")
|
|
|
|
| 38 |
input_tensor = preprocess(inp)
|
| 39 |
input_batch = input_tensor.unsqueeze(0).to('cpu') # Create a batch
|
| 40 |
|