vishalkatheriya commited on
Commit
f9968a3
·
verified ·
1 Parent(s): e71b5e5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -28,7 +28,8 @@ def load_model():
28
  model_id = "microsoft/Florence-2-large"
29
  #processor loading
30
  st.session_state.processor = AutoProcessor.from_pretrained(model_id, torch_dtype=torch.qint8, trust_remote_code=True)
31
- os.mkdir("temp")
 
32
  # Load the model normally
33
  with patch("transformers.dynamic_module_utils.get_imports", fixed_get_imports): # workaround for unnecessary flash_attn requirement
34
  model = AutoModelForCausalLM.from_pretrained(model_id, attn_implementation="sdpa", trust_remote_code=True)
 
28
  model_id = "microsoft/Florence-2-large"
29
  #processor loading
30
  st.session_state.processor = AutoProcessor.from_pretrained(model_id, torch_dtype=torch.qint8, trust_remote_code=True)
31
+
32
+ os.mkdir("temp", exist_ok=True)
33
  # Load the model normally
34
  with patch("transformers.dynamic_module_utils.get_imports", fixed_get_imports): # workaround for unnecessary flash_attn requirement
35
  model = AutoModelForCausalLM.from_pretrained(model_id, attn_implementation="sdpa", trust_remote_code=True)