TheStinger cappuch commited on
Commit
bd8aed8
1 Parent(s): e71a85c

Update app.py (#46)

Browse files

- Update app.py (2b3589aef59a08b43c7c3a5c27e56e204f587c67)


Co-authored-by: Mikus <cappuch@users.noreply.huggingface.co>

Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -121,6 +121,9 @@ def download_from_url(url, name=None):
121
  print(pth_file)
122
  print(index_file)
123
 
 
 
 
124
  MODELS.append({"model": pth_file, "index": index_file, "model_name": name})
125
  return ["Downloaded as " + name, pth_files[0], index_files[0]]
126
 
 
121
  print(pth_file)
122
  print(index_file)
123
 
124
+ if name == "":
125
+ name = pth_file.split(".")[0]
126
+
127
  MODELS.append({"model": pth_file, "index": index_file, "model_name": name})
128
  return ["Downloaded as " + name, pth_files[0], index_files[0]]
129