Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,10 +5,10 @@ from llama_cpp import Llama
|
|
5 |
from huggingface_hub import hf_hub_download
|
6 |
|
7 |
|
8 |
-
llm = Llama(model_path= hf_hub_download(repo_id="TheBloke/
|
9 |
|
10 |
def generate_text(input_text):
|
11 |
-
output = llm(f"Q: {input_text} A:", max_tokens=
|
12 |
return output['choices'][0]['text']
|
13 |
|
14 |
input_text = gr.inputs.Textbox(lines= 10, label="Enter your input text")
|
|
|
5 |
from huggingface_hub import hf_hub_download
|
6 |
|
7 |
|
8 |
+
llm = Llama(model_path= hf_hub_download(repo_id="TheBloke/StableBeluga-7B-GGML", filename="stablebeluga-7b.ggmlv3.q6_K.bin"))
|
9 |
|
10 |
def generate_text(input_text):
|
11 |
+
output = llm(f"Q: {input_text} A:", max_tokens=521, stop=["Q:", "\n"], echo=True)
|
12 |
return output['choices'][0]['text']
|
13 |
|
14 |
input_text = gr.inputs.Textbox(lines= 10, label="Enter your input text")
|