John6666 commited on
Commit
b3bf5dd
·
verified ·
1 Parent(s): 0b227dd

Upload mod.py

Browse files
Files changed (1) hide show
  1. mod.py +1 -1
mod.py CHANGED
@@ -73,7 +73,7 @@ def get_repo_safetensors(repo_id: str):
73
  api = HfApi(token=HF_TOKEN)
74
  try:
75
  tag = "None"
76
- if not is_repo_name(repo_id) or not is_repo_exists(repo_id): return gr.update(value="", choices=[]), tag
77
  files = api.list_repo_files(repo_id=repo_id)
78
  model_card = ModelCard.load(repo_id, token=HF_TOKEN)
79
  tag = model_card.data.get("instance_prompt", "")
 
73
  api = HfApi(token=HF_TOKEN)
74
  try:
75
  tag = "None"
76
+ if not is_repo_name(repo_id) or not is_repo_exists(repo_id): return gr.update(value="", choices=[]), gr.update()
77
  files = api.list_repo_files(repo_id=repo_id)
78
  model_card = ModelCard.load(repo_id, token=HF_TOKEN)
79
  tag = model_card.data.get("instance_prompt", "")