Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,6 +13,19 @@ model_name = model_id.split('/')[-1]
|
|
| 13 |
title = f"🇩🇪 {model_name}"
|
| 14 |
description = f"Chat with <a href=\"https://huggingface.co/{model_id}\">{model_name}</a> in GGUF format ({quant})!"
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
print("loading model")
|
| 17 |
# Initialize the LLM
|
| 18 |
llm = Llama(model_path="~/.cache/huggingface/hub/models--LSX-UniWue--LLaMmlein_1B_alternative_formats/snapshots/7d97b69ae6910b5f317be2dbd5b4820d848c66b4/LLaMmlein_1B_chat_selected.gguf",
|
|
|
|
| 13 |
title = f"🇩🇪 {model_name}"
|
| 14 |
description = f"Chat with <a href=\"https://huggingface.co/{model_id}\">{model_name}</a> in GGUF format ({quant})!"
|
| 15 |
|
| 16 |
+
print("find gguf file")
|
| 17 |
+
import os
|
| 18 |
+
from pathlib import Path
|
| 19 |
+
|
| 20 |
+
# Get the Hugging Face cache directory
|
| 21 |
+
hf_cache_dir = os.getenv("HF_HOME", str(Path.home() / ".cache" / "huggingface"))
|
| 22 |
+
|
| 23 |
+
# List all files in the Hugging Face cache directory
|
| 24 |
+
for root, dirs, files in os.walk(hf_cache_dir):
|
| 25 |
+
for file in files:
|
| 26 |
+
print(os.path.join(root, file))
|
| 27 |
+
|
| 28 |
+
|
| 29 |
print("loading model")
|
| 30 |
# Initialize the LLM
|
| 31 |
llm = Llama(model_path="~/.cache/huggingface/hub/models--LSX-UniWue--LLaMmlein_1B_alternative_formats/snapshots/7d97b69ae6910b5f317be2dbd5b4820d848c66b4/LLaMmlein_1B_chat_selected.gguf",
|