Tas01 commited on
Commit
531f90e
·
verified ·
1 Parent(s): 3355e27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -39,10 +39,11 @@ class ImageStoryteller:
39
  llm_model_id,
40
  torch_dtype=torch.float16,
41
  device_map="auto",
 
42
  # trust_remote_code=True if "phi" in llm_model_id else False
43
  # To this (for Qwen and other models):
44
- trust_remote_code=True if any(keyword in llm_model_id.lower() for keyword in ["phi", "qwen", "yi", "deepseek"]) else False
45
- )
46
  print(f"LLM model {llm_model_id} loaded successfully!")
47
  except Exception as e:
48
  print(f"LLM loading failed: {e}")
 
39
  llm_model_id,
40
  torch_dtype=torch.float16,
41
  device_map="auto",
42
+ trust_remote_code=True)
43
  # trust_remote_code=True if "phi" in llm_model_id else False
44
  # To this (for Qwen and other models):
45
+ # trust_remote_code=True if any(keyword in llm_model_id.lower() for keyword in ["phi", "qwen", "yi", "deepseek"]) else False
46
+
47
  print(f"LLM model {llm_model_id} loaded successfully!")
48
  except Exception as e:
49
  print(f"LLM loading failed: {e}")