rajatsingh0702
commited on
Commit
•
8001be7
1
Parent(s):
34960f0
Update app.py
Browse files
app.py
CHANGED
@@ -37,7 +37,7 @@ def make_tensor(img):
|
|
37 |
|
38 |
|
39 |
def predictC2S(img):
|
40 |
-
final_transform = TF.Resize((img.size[
|
41 |
img = np.array(img)
|
42 |
img = transform(img)
|
43 |
img = make_tensor(img)
|
@@ -52,7 +52,7 @@ def predictC2S(img):
|
|
52 |
|
53 |
|
54 |
def predictS2C(img, ref):
|
55 |
-
final_transform = TF.Resize((img.size[
|
56 |
img = np.array(img)
|
57 |
ref = np.array(ref)
|
58 |
ref = transform(ref)
|
@@ -77,7 +77,8 @@ def predictS2C(img, ref):
|
|
77 |
|
78 |
example_list1 = [["./examples/img1.jpg", "./examples/ref1.jpg"],
|
79 |
["./examples/img4.jpg", "./examples/ref4.jpg"],
|
80 |
-
["./examples/img3.jpg", "./examples/ref3.jpg"]
|
|
|
81 |
example_list2 = [["./examples/sketch1.jpg"],
|
82 |
["./examples/sketch2.jpg"],
|
83 |
["./examples/sketch3.jpg"],
|
|
|
37 |
|
38 |
|
39 |
def predictC2S(img):
|
40 |
+
final_transform = TF.Resize((img.size[1], img.size[0]))
|
41 |
img = np.array(img)
|
42 |
img = transform(img)
|
43 |
img = make_tensor(img)
|
|
|
52 |
|
53 |
|
54 |
def predictS2C(img, ref):
|
55 |
+
final_transform = TF.Resize((img.size[1], img.size[0]))
|
56 |
img = np.array(img)
|
57 |
ref = np.array(ref)
|
58 |
ref = transform(ref)
|
|
|
77 |
|
78 |
example_list1 = [["./examples/img1.jpg", "./examples/ref1.jpg"],
|
79 |
["./examples/img4.jpg", "./examples/ref4.jpg"],
|
80 |
+
["./examples/img3.jpg", "./examples/ref3.jpg"],
|
81 |
+
["./examples/img5.jpg", "./examples/ref5.jpg"]]
|
82 |
example_list2 = [["./examples/sketch1.jpg"],
|
83 |
["./examples/sketch2.jpg"],
|
84 |
["./examples/sketch3.jpg"],
|