witchEverly
commited on
Update CaptionGenerator.py
Browse files- CaptionGenerator.py +9 -9
CaptionGenerator.py
CHANGED
@@ -117,15 +117,15 @@ class CaptionGenerator:
|
|
117 |
st.error(f"Error occurred with Gemini API: {e}")
|
118 |
|
119 |
|
120 |
-
@st.cache_resource()
|
121 |
-
def load_model():
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
|
130 |
|
131 |
# Example usage of the CaptionGenerator class
|
|
|
117 |
st.error(f"Error occurred with Gemini API: {e}")
|
118 |
|
119 |
|
120 |
+
# @st.cache_resource()
|
121 |
+
# def load_model():
|
122 |
+
# """
|
123 |
+
# Loads the BLIP-2 model for image captioning. This function is cached to avoid
|
124 |
+
# re-loading the model on every call.
|
125 |
+
# :param CaptionGenerator: The class for generating captions for images.
|
126 |
+
# :return: Instance of the CaptionGenerator class.
|
127 |
+
# """
|
128 |
+
# return CaptionGenerator()
|
129 |
|
130 |
|
131 |
# Example usage of the CaptionGenerator class
|