Spaces:
Paused
Paused
Update olapp.py
Browse files
olapp.py
CHANGED
@@ -7,7 +7,7 @@ print("Loading model...")
|
|
7 |
|
8 |
llm = Llama(
|
9 |
model_path="/home/oluser/olapp/model-q4_K.gguf",
|
10 |
-
n_ctx=
|
11 |
n_parts=1,
|
12 |
)
|
13 |
|
@@ -24,9 +24,9 @@ class OlHandler(BaseHTTPRequestHandler):
|
|
24 |
|
25 |
output = llm(
|
26 |
q,
|
27 |
-
max_tokens=32,
|
28 |
echo=False
|
29 |
-
)
|
30 |
|
31 |
self.send_response(200)
|
32 |
self.end_headers()
|
|
|
7 |
|
8 |
llm = Llama(
|
9 |
model_path="/home/oluser/olapp/model-q4_K.gguf",
|
10 |
+
n_ctx=1024,
|
11 |
n_parts=1,
|
12 |
)
|
13 |
|
|
|
24 |
|
25 |
output = llm(
|
26 |
q,
|
27 |
+
max_tokens=32,
|
28 |
echo=False
|
29 |
+
)["choices"][0]["text"]
|
30 |
|
31 |
self.send_response(200)
|
32 |
self.end_headers()
|