ajayarora1235 commited on
Commit
1cc40d5
·
1 Parent(s): 7fb78d4

add associated usrs for each model

Browse files
Files changed (1) hide show
  1. app.py +8 -7
app.py CHANGED
@@ -1414,7 +1414,8 @@ def download_from_url(url, model, associated_user=None):
1414
  if file.endswith(".index"):
1415
  os.mkdir(f'./logs/{model}')
1416
  shutil.copy2(file_path,f'./logs/{model}')
1417
- associated_links[file] = associated_user
 
1418
  elif "G_" not in file and "D_" not in file and file.endswith(".pth"):
1419
  shutil.copy(file_path,f'./weights/{model}.pth')
1420
  if associated_user is not None:
@@ -1719,10 +1720,10 @@ def zip_downloader(model):
1719
  return f'./weights/{model}.pth', "Could not find Index file."
1720
 
1721
 
1722
- download_from_url('https://drive.google.com/uc?id=1O98vvnle_nZP8ZdpnZFLZ5TU1UZe7x0p&confirm=t', 'JVKE-main')
1723
- download_from_url('https://drive.google.com/uc?id=1Wag0vPlp42kRDffccXljjjlK7QsHf2xe&confirm=t', 'JVKE-main-v2')
1724
- download_from_url('https://drive.google.com/uc?id=1h810cil3YRlN4pu4oO43zKq9z3cYjItp&confirm=t', 'jvke-nighttime-v4')
1725
- download_from_url('https://drive.google.com/uc?id=1fa6FSLwqSQMI49NvSXOpI4pUVuKsrop5&confirm=t', 'Andoni')
1726
  weight_root = "weights"
1727
  index_root = "logs"
1728
  names = []
@@ -2072,8 +2073,8 @@ with gr.Blocks(theme=gr.themes.Default(primary_hue="pink", secondary_hue="rose")
2072
  interactive=True,
2073
  )
2074
  refresh_button.click(
2075
- fn=lambda: change_choices()[1],
2076
- inputs=[],
2077
  outputs=file_index4,
2078
  )
2079
  # file_big_npy2 = gr.Textbox(
 
1414
  if file.endswith(".index"):
1415
  os.mkdir(f'./logs/{model}')
1416
  shutil.copy2(file_path,f'./logs/{model}')
1417
+ if associated_user is not None:
1418
+ associated_links[file] = associated_user
1419
  elif "G_" not in file and "D_" not in file and file.endswith(".pth"):
1420
  shutil.copy(file_path,f'./weights/{model}.pth')
1421
  if associated_user is not None:
 
1720
  return f'./weights/{model}.pth', "Could not find Index file."
1721
 
1722
 
1723
+ download_from_url('https://drive.google.com/uc?id=1O98vvnle_nZP8ZdpnZFLZ5TU1UZe7x0p&confirm=t', 'JVKE-main', 'jvke')
1724
+ download_from_url('https://drive.google.com/uc?id=1Wag0vPlp42kRDffccXljjjlK7QsHf2xe&confirm=t', 'JVKE-main-v2', 'jvke')
1725
+ download_from_url('https://drive.google.com/uc?id=1h810cil3YRlN4pu4oO43zKq9z3cYjItp&confirm=t', 'jvke-nighttime-v4', 'jvke')
1726
+ download_from_url('https://drive.google.com/uc?id=1fa6FSLwqSQMI49NvSXOpI4pUVuKsrop5&confirm=t', 'Andoni', 'cmss60')
1727
  weight_root = "weights"
1728
  index_root = "logs"
1729
  names = []
 
2073
  interactive=True,
2074
  )
2075
  refresh_button.click(
2076
+ fn=lambda username: change_choices(username)[1],
2077
+ inputs=[gr.State('username')],
2078
  outputs=file_index4,
2079
  )
2080
  # file_big_npy2 = gr.Textbox(