Update app.py
Browse files
app.py
CHANGED
|
@@ -581,7 +581,7 @@ def test_single_image(generator_path, input_image_path):
|
|
| 581 |
generator.eval()
|
| 582 |
|
| 583 |
# Preprocess the input image
|
| 584 |
-
|
| 585 |
|
| 586 |
# Perform inference
|
| 587 |
with torch.no_grad():
|
|
@@ -593,4 +593,4 @@ def test_single_image(generator_path, input_image_path):
|
|
| 593 |
plt.show()
|
| 594 |
|
| 595 |
|
| 596 |
-
|
|
|
|
| 581 |
generator.eval()
|
| 582 |
|
| 583 |
# Preprocess the input image
|
| 584 |
+
input_image = preprocess_input(input_image_path).to(device)
|
| 585 |
|
| 586 |
# Perform inference
|
| 587 |
with torch.no_grad():
|
|
|
|
| 593 |
plt.show()
|
| 594 |
|
| 595 |
|
| 596 |
+
test_single_image('pre_trained_model_064.pt',uploaded_image_data)
|