omersaidd commited on
Commit
e59a11e
1 Parent(s): 954d18e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -10
app.py CHANGED
@@ -14,17 +14,25 @@ from huggingface_hub import hf_hub_download
14
  huggingface_token = os.getenv("HUGGINGFACE_TOKEN")
15
 
16
  hf_hub_download(
17
- repo_id="cognitivecomputations/dolphin-2.9.4-llama3.1-8b-gguf",
18
- filename="dolphin-2.9.4-llama3.1-8b-Q2_K.gguf",
19
  local_dir="./models"
20
  )
21
 
22
  hf_hub_download(
23
- repo_id="cognitivecomputations/dolphin-2.9.4-llama3.1-8b-gguf",
24
- filename="dolphin-2.9.4-llama3.1-8b-Q3_K_L.gguf",
25
  local_dir="./models"
26
  )
27
 
 
 
 
 
 
 
 
 
28
 
29
  llm = None
30
  llm_model = None
@@ -41,7 +49,7 @@ def respond(
41
  top_k,
42
  repeat_penalty,
43
  ):
44
- chat_template = MessagesFormatterType.GEMMA2
45
 
46
  global llm
47
  global llm_model
@@ -115,13 +123,14 @@ demo = gr.ChatInterface(
115
  respond,
116
  additional_inputs=[
117
  gr.Dropdown([
118
- 'dolphin-2.9.4-llama3.1-8b-Q2_K.gguf',
119
- 'dolphin-2.9.4-llama3.1-8b-Q3_K_L.gguf'
 
120
  ],
121
- value="dolphin-2.9.4-llama3.1-8b-Q3_K_L.gguf",
122
  label="Model"
123
  ),
124
- gr.Textbox(value="Sen yardımsever bir asistansın.", label="System message"),
125
  gr.Slider(minimum=1, maximum=4096, value=2048, step=1, label="Max tokens"),
126
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
127
  gr.Slider(
@@ -150,7 +159,7 @@ demo = gr.ChatInterface(
150
  undo_btn="Undo",
151
  clear_btn="Clear",
152
  submit_btn="Send",
153
- title="Chat with LLama 3.1 using llama.cpp",
154
  description=description,
155
  chatbot=gr.Chatbot(
156
  scale=1,
 
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",
19
  local_dir="./models"
20
  )
21
 
22
  hf_hub_download(
23
+ repo_id="bartowski/gemma-2-27b-it-GGUF",
24
+ filename="gemma-2-27b-it-Q5_K_M.gguf",
25
  local_dir="./models"
26
  )
27
 
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
 
49
  top_k,
50
  repeat_penalty,
51
  ):
52
+ chat_template = MessagesFormatterType.GEMMA_2
53
 
54
  global llm
55
  global llm_model
 
123
  respond,
124
  additional_inputs=[
125
  gr.Dropdown([
126
+ 'gemma-2-9b-it-Q5_K_M.gguf',
127
+ 'gemma-2-27b-it-Q5_K_M.gguf',
128
+ '2b_it_v2.gguf'
129
  ],
130
+ value="2b_it_v2.gguf",
131
  label="Model"
132
  ),
133
+ gr.Textbox(value="You are a helpful assistant.", label="System message"),
134
  gr.Slider(minimum=1, maximum=4096, value=2048, step=1, label="Max tokens"),
135
  gr.Slider(minimum=0.1, maximum=4.0, value=0.7, step=0.1, label="Temperature"),
136
  gr.Slider(
 
159
  undo_btn="Undo",
160
  clear_btn="Clear",
161
  submit_btn="Send",
162
+ title="Chat with Gemma 2 using llama.cpp",
163
  description=description,
164
  chatbot=gr.Chatbot(
165
  scale=1,