Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -6,17 +6,14 @@ from llama_cpp import Llama
|
|
6 |
from huggingface_hub import hf_hub_download #load from huggingfaces
|
7 |
|
8 |
|
9 |
-
llm = Llama(model_path= hf_hub_download(repo_id="TheBloke/
|
10 |
|
11 |
history = []
|
12 |
|
13 |
def generate_text(input_text, history):
|
14 |
print("history ",history)
|
15 |
print("input ", input_text)
|
16 |
-
|
17 |
-
print("full convo", full_conversation)
|
18 |
-
|
19 |
-
output = llm(full_conversation, max_tokens=1024, stop=["Q:", "\n"], echo=True)
|
20 |
response = output['choices'][0]['text']
|
21 |
return response
|
22 |
|
|
|
6 |
from huggingface_hub import hf_hub_download #load from huggingfaces
|
7 |
|
8 |
|
9 |
+
llm = Llama(model_path= hf_hub_download(repo_id="TheBloke/Vigogne-2-7B-Chat-GGML", filename="vigogne-2-7b-chat.ggmlv3.q4_1.bin"), n_ctx=2048) #download model from hf/ n_ctx=2048 for high ccontext length
|
10 |
|
11 |
history = []
|
12 |
|
13 |
def generate_text(input_text, history):
|
14 |
print("history ",history)
|
15 |
print("input ", input_text)
|
16 |
+
output = llm(input_text, max_tokens=1024, stop=["Q:", "\n"], echo=True)
|
|
|
|
|
|
|
17 |
response = output['choices'][0]['text']
|
18 |
return response
|
19 |
|