rafaaa2105 commited on
Commit
a7cc301
1 Parent(s): c3967c0

Add Progressbar

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -24,7 +24,7 @@ def download_file(url, filename, progress=gr.Progress(track_tqdm=True)):
24
  if total_size_in_bytes != 0 and progress_bar.n != total_size_in_bytes:
25
  print("ERROR, something went wrong")
26
 
27
- def get_civitai_model_info(model_id):
28
  url = f"https://civitai.com/api/v1/models/{model_id}"
29
  response = requests.get(url)
30
  if response.status_code != 200:
@@ -37,7 +37,7 @@ def find_download_url(data, file_extension):
37
  return file['downloadUrl']
38
  return None
39
 
40
- def download_civitai_model(model_id, lora_id=""):
41
  try:
42
  model_data = get_civitai_model_info(model_id)
43
  if model_data is None:
 
24
  if total_size_in_bytes != 0 and progress_bar.n != total_size_in_bytes:
25
  print("ERROR, something went wrong")
26
 
27
+ def get_civitai_model_info(model_id, progress=gr.Progress(track_tqdm=True)):
28
  url = f"https://civitai.com/api/v1/models/{model_id}"
29
  response = requests.get(url)
30
  if response.status_code != 200:
 
37
  return file['downloadUrl']
38
  return None
39
 
40
+ def download_civitai_model(model_id, lora_id="", progress=gr.Progress(track_tqdm=True)):
41
  try:
42
  model_data = get_civitai_model_info(model_id)
43
  if model_data is None: