multimodalart HF staff commited on
Commit
9669215
1 Parent(s): 086ddff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -12,7 +12,9 @@ import json
12
  TRUSTED_UPLOADERS = ["KappaNeuro", "CiroN2022", "multimodalart", "Norod78", "joachimsallstrom", "blink7630", "e-n-v-y", "DoctorDiffusion", "RalFinger"]
13
 
14
  def get_json_data(url):
15
- api_url = f"https://civitai.com/api/v1/models/{url.split('/')[4]}"
 
 
16
  try:
17
  response = requests.get(api_url)
18
  response.raise_for_status()
@@ -63,6 +65,7 @@ def extract_info(json_data):
63
  "SD 2.0 768": "stabilityai/stable-diffusion-2"
64
  }
65
  base_model = model_mapping[model_version["baseModel"]]
 
66
  info = {
67
  "urls_to_download": urls_to_download,
68
  "id": model_version["id"],
 
12
  TRUSTED_UPLOADERS = ["KappaNeuro", "CiroN2022", "multimodalart", "Norod78", "joachimsallstrom", "blink7630", "e-n-v-y", "DoctorDiffusion", "RalFinger"]
13
 
14
  def get_json_data(url):
15
+ url_split = url.split('/')
16
+ print("url_split: ", url_split)
17
+ api_url = f"https://civitai.com/api/v1/models/{url_split[4]}"
18
  try:
19
  response = requests.get(api_url)
20
  response.raise_for_status()
 
65
  "SD 2.0 768": "stabilityai/stable-diffusion-2"
66
  }
67
  base_model = model_mapping[model_version["baseModel"]]
68
+ print("model version: ", model_version)
69
  info = {
70
  "urls_to_download": urls_to_download,
71
  "id": model_version["id"],