gokaygokay commited on
Commit
f8adeca
1 Parent(s): 924ebe6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import spaces
 
2
  import json
3
  import subprocess
4
  from llama_cpp import Llama
@@ -9,6 +10,9 @@ from llama_cpp_agent.chat_history.messages import Roles
9
  import gradio as gr
10
  from huggingface_hub import hf_hub_download
11
 
 
 
 
12
  hf_hub_download(
13
  repo_id="bartowski/gemma-2-9b-it-GGUF",
14
  filename="gemma-2-9b-it-Q5_K_M.gguf",
@@ -24,10 +28,12 @@ hf_hub_download(
24
  hf_hub_download(
25
  repo_id="google/gemma-2-2b-it-GGUF",
26
  filename="2b_it_v2.gguf",
27
- local_dir="./models"
 
28
  )
29
 
30
 
 
31
  llm = None
32
  llm_model = None
33
 
 
1
  import spaces
2
+ import os
3
  import json
4
  import subprocess
5
  from llama_cpp import Llama
 
10
  import gradio as gr
11
  from huggingface_hub import hf_hub_download
12
 
13
+
14
+ huggingface_token = os.getenv("HUGGINGFACE_TOKEN")
15
+
16
  hf_hub_download(
17
  repo_id="bartowski/gemma-2-9b-it-GGUF",
18
  filename="gemma-2-9b-it-Q5_K_M.gguf",
 
28
  hf_hub_download(
29
  repo_id="google/gemma-2-2b-it-GGUF",
30
  filename="2b_it_v2.gguf",
31
+ local_dir="./models",
32
+ token=huggingface_token
33
  )
34
 
35
 
36
+
37
  llm = None
38
  llm_model = None
39