Spaces:
Sleeping
Sleeping
mostafaamiri
commited on
Commit
•
b361fd5
1
Parent(s):
a77a167
Update app.py
Browse files
app.py
CHANGED
@@ -25,10 +25,12 @@ llm = LlamaCpp(
|
|
25 |
top_p=1,
|
26 |
)
|
27 |
|
28 |
-
|
|
|
|
|
29 |
def generate_output(text):
|
30 |
result = ""
|
31 |
-
for s in llm.stream(text):
|
32 |
result += s
|
33 |
yield result
|
34 |
|
|
|
25 |
top_p=1,
|
26 |
)
|
27 |
|
28 |
+
prompt = """Below is an instruction that describes a task.
|
29 |
+
Write a response that appropriately completes the request.\n\n
|
30 |
+
### Instruction:\n\n{}\n\n \n\n### Response:\n\n\n"""
|
31 |
def generate_output(text):
|
32 |
result = ""
|
33 |
+
for s in llm.stream(prompt.format(text)):
|
34 |
result += s
|
35 |
yield result
|
36 |
|