Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -6,6 +6,7 @@ import os
|
|
6 |
import json
|
7 |
import subprocess
|
8 |
import sys
|
|
|
9 |
from llama_cpp import Llama
|
10 |
from llama_cpp_agent import LlamaCppAgent
|
11 |
from llama_cpp_agent.providers import LlamaCppPythonProvider
|
@@ -19,9 +20,11 @@ from logger import logging
|
|
19 |
from exception import CustomExceptionHandling
|
20 |
|
21 |
|
22 |
-
#
|
23 |
-
|
|
|
24 |
|
|
|
25 |
hf_hub_download(
|
26 |
repo_id="google/gemma-3-1b-it-qat-q4_0-gguf",
|
27 |
filename="gemma-3-1b-it-q4_0.gguf",
|
|
|
6 |
import json
|
7 |
import subprocess
|
8 |
import sys
|
9 |
+
from dotenv import load_dotenv
|
10 |
from llama_cpp import Llama
|
11 |
from llama_cpp_agent import LlamaCppAgent
|
12 |
from llama_cpp_agent.providers import LlamaCppPythonProvider
|
|
|
20 |
from exception import CustomExceptionHandling
|
21 |
|
22 |
|
23 |
+
# Load the Environment Variables from .env file
|
24 |
+
load_dotenv()
|
25 |
+
huggingface_token = os.environ.get("HF_TOKEN")
|
26 |
|
27 |
+
# Download gguf model files
|
28 |
hf_hub_download(
|
29 |
repo_id="google/gemma-3-1b-it-qat-q4_0-gguf",
|
30 |
filename="gemma-3-1b-it-q4_0.gguf",
|