ShreyMehra commited on
Commit
96bdb8d
·
unverified ·
1 Parent(s): 90db0fc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -61,10 +61,12 @@ class Model:
61
  # config = PeftConfig.from_pretrained(peft_model_id)
62
  global model
63
  global processor
64
- PATH = "./model/"
65
- local_files_only=True
66
  model = Blip2ForConditionalGeneration.from_pretrained(PATH, local_files_only=True, low_cpu_mem_usage=True, torch_dtype=torch.float16) #, device_map="auto", load_in_8bit=True
 
67
  model = PeftModel.from_pretrained(model, peft_model_id)
 
 
68
  processor = AutoProcessor.from_pretrained("Salesforce/blip2-opt-2.7b")
69
 
70
  def main():
 
61
  # config = PeftConfig.from_pretrained(peft_model_id)
62
  global model
63
  global processor
64
+ PATH = "model/"
 
65
  model = Blip2ForConditionalGeneration.from_pretrained(PATH, local_files_only=True, low_cpu_mem_usage=True, torch_dtype=torch.float16) #, device_map="auto", load_in_8bit=True
66
+ print(-1)
67
  model = PeftModel.from_pretrained(model, peft_model_id)
68
+
69
+ print(-2)
70
  processor = AutoProcessor.from_pretrained("Salesforce/blip2-opt-2.7b")
71
 
72
  def main():