Spaces:
Running
Running
vishalkatheriya18
commited on
Commit
•
c096e3a
1
Parent(s):
58b5cd0
Update classification.py
Browse files- classification.py +11 -11
classification.py
CHANGED
@@ -20,7 +20,7 @@ def inferring(encoding, model):
|
|
20 |
|
21 |
|
22 |
# #testing
|
23 |
-
# def
|
24 |
# with torch.no_grad():
|
25 |
# outputs = model(**encoding)
|
26 |
# logits = outputs.logits
|
@@ -51,10 +51,10 @@ def pipes(image,categories):
|
|
51 |
# Define functions to run the models in parallel
|
52 |
with concurrent.futures.ThreadPoolExecutor() as executor:
|
53 |
futures = {
|
54 |
-
executor.submit(
|
55 |
-
executor.submit(
|
56 |
-
executor.submit(
|
57 |
-
executor.submit(
|
58 |
}
|
59 |
|
60 |
results = {}
|
@@ -72,10 +72,10 @@ def pipes(image,categories):
|
|
72 |
# Define functions to run the models in parallel
|
73 |
with concurrent.futures.ThreadPoolExecutor() as executor:
|
74 |
futures = {
|
75 |
-
executor.submit(
|
76 |
-
executor.submit(
|
77 |
-
executor.submit(
|
78 |
-
executor.submit(
|
79 |
}
|
80 |
|
81 |
results = {}
|
@@ -93,7 +93,7 @@ def pipes(image,categories):
|
|
93 |
# Define functions to run the models in parallel
|
94 |
with concurrent.futures.ThreadPoolExecutor() as executor:
|
95 |
futures = {
|
96 |
-
executor.submit(
|
97 |
}
|
98 |
|
99 |
results = {}
|
@@ -111,7 +111,7 @@ def pipes(image,categories):
|
|
111 |
# Define functions to run the models in parallel
|
112 |
with concurrent.futures.ThreadPoolExecutor() as executor:
|
113 |
futures = {
|
114 |
-
executor.submit(
|
115 |
}
|
116 |
|
117 |
results = {}
|
|
|
20 |
|
21 |
|
22 |
# #testing
|
23 |
+
# def inferring(encoding,model):
|
24 |
# with torch.no_grad():
|
25 |
# outputs = model(**encoding)
|
26 |
# logits = outputs.logits
|
|
|
51 |
# Define functions to run the models in parallel
|
52 |
with concurrent.futures.ThreadPoolExecutor() as executor:
|
53 |
futures = {
|
54 |
+
executor.submit(inferring, encoding, top_wear_model): "topwear",
|
55 |
+
executor.submit(inferring, encoding, pattern_model): "patterns",
|
56 |
+
executor.submit(inferring, encoding, print_model): "prints",
|
57 |
+
executor.submit(inferring, encoding, sleeve_length_model): "sleeve_length"
|
58 |
}
|
59 |
|
60 |
results = {}
|
|
|
72 |
# Define functions to run the models in parallel
|
73 |
with concurrent.futures.ThreadPoolExecutor() as executor:
|
74 |
futures = {
|
75 |
+
executor.submit(inferring, encoding, full_wear_model): "fullwear",
|
76 |
+
executor.submit(inferring, encoding, pattern_model): "patterns",
|
77 |
+
executor.submit(inferring, encoding, print_model): "prints",
|
78 |
+
executor.submit(inferring, encoding, sleeve_length_model): "sleeve_length"
|
79 |
}
|
80 |
|
81 |
results = {}
|
|
|
93 |
# Define functions to run the models in parallel
|
94 |
with concurrent.futures.ThreadPoolExecutor() as executor:
|
95 |
futures = {
|
96 |
+
executor.submit(inferring, encoding, bottom_wear_model): "lowerwear",
|
97 |
}
|
98 |
|
99 |
results = {}
|
|
|
111 |
# Define functions to run the models in parallel
|
112 |
with concurrent.futures.ThreadPoolExecutor() as executor:
|
113 |
futures = {
|
114 |
+
executor.submit(inferring, encoding, neck_style_model): "Neckstyle",
|
115 |
}
|
116 |
|
117 |
results = {}
|