Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ from llama_cpp import Llama
|
|
4 |
llm = Llama(model_path="ggml-alpaca-7b-q4.bin")
|
5 |
|
6 |
def generate_text(input_text):
|
7 |
-
output = llm(f"
|
8 |
return output['choices'][0]['text']
|
9 |
|
10 |
input_text = gr.inputs.Textbox(lines= 10, label="Enter your input text")
|
|
|
4 |
llm = Llama(model_path="ggml-alpaca-7b-q4.bin")
|
5 |
|
6 |
def generate_text(input_text):
|
7 |
+
output = llm(f"{input_text}", max_tokens=128, stop=["Q:", "\n", "#"], echo=False)
|
8 |
return output['choices'][0]['text']
|
9 |
|
10 |
input_text = gr.inputs.Textbox(lines= 10, label="Enter your input text")
|