Spaces:
Running
Running
Commit
·
0c9e779
1
Parent(s):
ccea513
edit fig2 typo
Browse files
app.py
CHANGED
|
@@ -14,7 +14,6 @@ torch.hub.download_url_to_file(
|
|
| 14 |
'aalto.fi_website.png')
|
| 15 |
|
| 16 |
|
| 17 |
-
|
| 18 |
def inference(img, template, angel):
|
| 19 |
color_image = cv2.imread(img.name, cv2.IMREAD_COLOR)
|
| 20 |
|
|
@@ -35,19 +34,12 @@ def inference(img, template, angel):
|
|
| 35 |
result_image = cv2.cvtColor(new_HSV_image, cv2.COLOR_HSV2BGR)
|
| 36 |
|
| 37 |
cv2.imwrite('fig_1_cv.jpg', fig_1_cv)
|
| 38 |
-
cv2.imwrite('fig_2_cv.jpg',
|
| 39 |
cv2.imwrite('result_image.jpg', result_image)
|
| 40 |
|
| 41 |
|
| 42 |
return ['result_image.jpg', 'fig_1_cv.jpg', 'fig_2_cv.jpg']
|
| 43 |
|
| 44 |
-
|
| 45 |
-
title = 'Color Harmonization'
|
| 46 |
-
description = 'Compute Color Harmonization with Different Templates'
|
| 47 |
-
article = "<p style='text-align: center'></p>"
|
| 48 |
-
examples = [['wikipedia.org_website.png'], ['aalto.fi_website.png']]
|
| 49 |
-
css = ".output_image, .input_image {height: 40rem !important; width: 100% !important;}"
|
| 50 |
-
|
| 51 |
title = 'Color Harmonization'
|
| 52 |
description = 'Compute Color Harmonization with Different Templates'
|
| 53 |
article = "<p style='text-align: center'></p>"
|
|
@@ -69,4 +61,4 @@ gr.Interface(
|
|
| 69 |
article=article,
|
| 70 |
examples=examples,
|
| 71 |
# css=css,
|
| 72 |
-
).launch(debug=True, enable_queue=True)
|
|
|
|
| 14 |
'aalto.fi_website.png')
|
| 15 |
|
| 16 |
|
|
|
|
| 17 |
def inference(img, template, angel):
|
| 18 |
color_image = cv2.imread(img.name, cv2.IMREAD_COLOR)
|
| 19 |
|
|
|
|
| 34 |
result_image = cv2.cvtColor(new_HSV_image, cv2.COLOR_HSV2BGR)
|
| 35 |
|
| 36 |
cv2.imwrite('fig_1_cv.jpg', fig_1_cv)
|
| 37 |
+
cv2.imwrite('fig_2_cv.jpg', fig_2_cv)
|
| 38 |
cv2.imwrite('result_image.jpg', result_image)
|
| 39 |
|
| 40 |
|
| 41 |
return ['result_image.jpg', 'fig_1_cv.jpg', 'fig_2_cv.jpg']
|
| 42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
title = 'Color Harmonization'
|
| 44 |
description = 'Compute Color Harmonization with Different Templates'
|
| 45 |
article = "<p style='text-align: center'></p>"
|
|
|
|
| 61 |
article=article,
|
| 62 |
examples=examples,
|
| 63 |
# css=css,
|
| 64 |
+
).launch(debug=True, enable_queue=True)
|