reach-vb HF staff commited on
Commit
4224faf
·
verified ·
1 Parent(s): 0f54865

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -8,7 +8,10 @@ from typing import Union
8
 
9
  def download_file(media_type, digest, image):
10
  url = f"https://registry.ollama.ai/v2/library/{image}/blobs/{digest}"
11
- file_name = f"blobs/{media_type.split('.')[-1]}"
 
 
 
12
 
13
  # Create the directory if it doesn't exist
14
  os.makedirs(os.path.dirname(file_name), exist_ok=True)
 
8
 
9
  def download_file(media_type, digest, image):
10
  url = f"https://registry.ollama.ai/v2/library/{image}/blobs/{digest}"
11
+ f_tag = {media_type.split('.')[-1]}
12
+ if f_tag == "model":
13
+ f_tag = "model.gguf"
14
+ file_name = f"blobs/{f_tag}"
15
 
16
  # Create the directory if it doesn't exist
17
  os.makedirs(os.path.dirname(file_name), exist_ok=True)