operablepattern commited on
Commit
b12a44a
1 Parent(s): f40ba5e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -14
app.py CHANGED
@@ -1,20 +1,21 @@
1
  import gradio as gr
2
  from llama_cpp import Llama
3
 
4
- llm = Llama.from_pretrained(
5
- repo_id="operablepattern/gemma-2b-it-Q",
6
- filename="*Q5_K_M.gguf",
7
- chat_format="gemma",
8
- max_tokens=32,
9
- verbose=True
10
- )
11
- # except:
12
- # llm = Llama(
13
- # model_path="./gemma-2b-it-Q5_K_M.gguf",
14
- # max_tokens=32,
15
- # chat_format="gemma",
16
- # verbose=True
17
- # )
 
18
 
19
  def response(message, history):
20
  print(message)
 
1
  import gradio as gr
2
  from llama_cpp import Llama
3
 
4
+ try:
5
+ llm = Llama.from_pretrained(
6
+ repo_id="operablepattern/gemma-2b-it-Q",
7
+ filename="*Q5_K_M.gguf",
8
+ chat_format="gemma",
9
+ max_tokens=32,
10
+ verbose=True
11
+ )
12
+ except:
13
+ llm = Llama(
14
+ model_path="./gemma-2b-it-Q5_K_M.gguf",
15
+ chat_format="gemma",
16
+ max_tokens=32,
17
+ verbose=True
18
+ )
19
 
20
  def response(message, history):
21
  print(message)