witchEverly commited on
Commit
b6f57ae
·
verified ·
1 Parent(s): 6e4fd34

Update CaptionGenerator.py

Browse files
Files changed (1) hide show
  1. 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
- 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
 
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