Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -12,12 +12,11 @@ llm = None
|
|
| 12 |
def get_llm():
|
| 13 |
global llm
|
| 14 |
if llm is None:
|
| 15 |
-
# Download and load model from Hugging Face
|
| 16 |
llm = AutoModelForCausalLM.from_pretrained(
|
| 17 |
model_repo,
|
| 18 |
model_file=model_filename,
|
| 19 |
model_type="llama",
|
| 20 |
-
hf_token=os.environ.get("HF_TOKEN", ""),
|
| 21 |
context_length=1024,
|
| 22 |
threads=2
|
| 23 |
)
|
|
|
|
| 12 |
def get_llm():
|
| 13 |
global llm
|
| 14 |
if llm is None:
|
| 15 |
+
# Download and load model from Hugging Face (public model, no token needed)
|
| 16 |
llm = AutoModelForCausalLM.from_pretrained(
|
| 17 |
model_repo,
|
| 18 |
model_file=model_filename,
|
| 19 |
model_type="llama",
|
|
|
|
| 20 |
context_length=1024,
|
| 21 |
threads=2
|
| 22 |
)
|