bartowski commited on
Commit
6832797
·
1 Parent(s): 26580dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -47,7 +47,7 @@ def process_model(
47
  )
48
  print("Model downloaded successully!")
49
 
50
- metadata_update = f"yes | python3 llama.cpp/gguf-py/scripts/gguf_set_metadata.py {MODEL_NAME}/{FILE_PATH} {key} {value}"
51
  subprocess.run(metadata_update, shell=True)
52
  print(f"Model metadata {key} updated to {value} successully!")
53
 
@@ -100,7 +100,10 @@ with gr.Blocks() as demo:
100
  repo_id=model_id,
101
  recursive=True,
102
  ):
103
- files.append(file.path)
 
 
 
104
 
105
  return gr.update(visible=False), gr.update(visible=True, choices=files)
106
  except Exception:
 
47
  )
48
  print("Model downloaded successully!")
49
 
50
+ metadata_update = f"yes YES | python3 llama.cpp/gguf-py/scripts/gguf_set_metadata.py {MODEL_NAME}/{FILE_PATH} {key} {value}"
51
  subprocess.run(metadata_update, shell=True)
52
  print(f"Model metadata {key} updated to {value} successully!")
53
 
 
100
  repo_id=model_id,
101
  recursive=True,
102
  ):
103
+ if "of-0000" in file.path and "0001-of-" not in file.path:
104
+ pass
105
+ elif file.path.endswith("gguf"):
106
+ files.append(file.path)
107
 
108
  return gr.update(visible=False), gr.update(visible=True, choices=files)
109
  except Exception: