Spaces:
Sleeping
Sleeping
operablepattern
commited on
Commit
•
0934e21
1
Parent(s):
b12a44a
Update app.py
Browse files
app.py
CHANGED
@@ -6,21 +6,19 @@ try:
|
|
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)
|
22 |
print(history)
|
23 |
-
output = llm(message)
|
24 |
print(output)
|
25 |
return message
|
26 |
|
|
|
6 |
repo_id="operablepattern/gemma-2b-it-Q",
|
7 |
filename="*Q5_K_M.gguf",
|
8 |
chat_format="gemma",
|
|
|
9 |
verbose=True
|
10 |
)
|
11 |
except:
|
12 |
llm = Llama(
|
13 |
model_path="./gemma-2b-it-Q5_K_M.gguf",
|
14 |
chat_format="gemma",
|
|
|
15 |
verbose=True
|
16 |
)
|
17 |
|
18 |
def response(message, history):
|
19 |
print(message)
|
20 |
print(history)
|
21 |
+
output = llm(message,max_tokens=32)
|
22 |
print(output)
|
23 |
return message
|
24 |
|