Update app.py
Browse files
app.py
CHANGED
|
@@ -593,20 +593,20 @@ def test_single_image(generator_path, input_image_path):
|
|
| 593 |
output = output.transpose(1, 2, 0)
|
| 594 |
plt.imshow(output)
|
| 595 |
plt.show()
|
|
|
|
|
|
|
|
|
|
| 596 |
|
| 597 |
|
| 598 |
#test_single_image('pre_trained_model_064.pt',uploaded_image_data)
|
| 599 |
# Define Gradio interface
|
| 600 |
-
|
| 601 |
output = gr.outputs.Image(type="file", label="Super-Resolved Image")
|
| 602 |
|
| 603 |
-
# Load the generator model path
|
| 604 |
-
generator_path = 'pre_trained_model_064.pt'
|
| 605 |
-
|
| 606 |
|
| 607 |
|
| 608 |
# Deploy the interface
|
| 609 |
-
gr.Interface(test_single_image,
|
| 610 |
model_name="Super Resolution",
|
| 611 |
title="Image Super-Resolution",
|
| 612 |
description="Upload an image to see it super-resolved.").launch()
|
|
|
|
| 593 |
output = output.transpose(1, 2, 0)
|
| 594 |
plt.imshow(output)
|
| 595 |
plt.show()
|
| 596 |
+
# Load the generator model path
|
| 597 |
+
generator_path = '/pre_trained_model_064.pt'
|
| 598 |
+
|
| 599 |
|
| 600 |
|
| 601 |
#test_single_image('pre_trained_model_064.pt',uploaded_image_data)
|
| 602 |
# Define Gradio interface
|
| 603 |
+
uploaded_image_data = gr.inputs.Image(type="pil", label="Upload Image")
|
| 604 |
output = gr.outputs.Image(type="file", label="Super-Resolved Image")
|
| 605 |
|
|
|
|
|
|
|
|
|
|
| 606 |
|
| 607 |
|
| 608 |
# Deploy the interface
|
| 609 |
+
gr.Interface(test_single_image, uploaded_image_data, output,
|
| 610 |
model_name="Super Resolution",
|
| 611 |
title="Image Super-Resolution",
|
| 612 |
description="Upload an image to see it super-resolved.").launch()
|