witchEverly commited on
Commit
cad7e81
·
verified ·
1 Parent(s): 727e68b

Update app_utils.py

Browse files
Files changed (1) hide show
  1. app_utils.py +2 -2
app_utils.py CHANGED
@@ -33,8 +33,8 @@ def init_model():
33
  :returns: AutoProcessor, Blip2ForConditionalGeneration, bool - Model processor, BLIP-2 model, and flag.
34
  """
35
  try:
36
- processor = AutoProcessor.from_pretrained(os.path.expanduser('~/data/pretrained/blip2-opt-2.7b'))
37
- blip2_model = Blip2ForConditionalGeneration.from_pretrained(os.path.expanduser('~/data/pretrained/blip2-opt-2.7b'))
38
  return processor, blip2_model
39
  except Exception as e:
40
  st.error(f"Error occurred during model initialization: {e}")
 
33
  :returns: AutoProcessor, Blip2ForConditionalGeneration, bool - Model processor, BLIP-2 model, and flag.
34
  """
35
  try:
36
+ processor = AutoProcessor.from_pretrained("Salesforce/blip2-opt-2.7b")
37
+ blip2_model = Blip2ForConditionalGeneration.from_pretrained("Salesforce/blip2-opt-2.7b")
38
  return processor, blip2_model
39
  except Exception as e:
40
  st.error(f"Error occurred during model initialization: {e}")