Spaces:
Sleeping
Sleeping
solving the model choice bug
Browse files- inference.py +3 -3
inference.py
CHANGED
@@ -16,11 +16,11 @@ class Inference:
|
|
16 |
|
17 |
def inference(self, selected, image, text):
|
18 |
self.logger.info(f"selected model {selected}")
|
19 |
-
if selected == "
|
20 |
return self.__inference_vilt(image, text)
|
21 |
-
elif selected == "
|
22 |
return self.__inference_saffal_blip(image, text)
|
23 |
-
elif selected == "
|
24 |
return self.__inference_control_net_blip(image, text)
|
25 |
else:
|
26 |
self.logger.warning("Please select a model to make the inference..")
|
|
|
16 |
|
17 |
def inference(self, selected, image, text):
|
18 |
self.logger.info(f"selected model {selected}")
|
19 |
+
if selected == "ViLT":
|
20 |
return self.__inference_vilt(image, text)
|
21 |
+
elif selected == "Blip Saffal":
|
22 |
return self.__inference_saffal_blip(image, text)
|
23 |
+
elif selected == "Blip CN":
|
24 |
return self.__inference_control_net_blip(image, text)
|
25 |
else:
|
26 |
self.logger.warning("Please select a model to make the inference..")
|