Spaces:
Runtime error
Runtime error
Commit
·
9b09a43
1
Parent(s):
aed3723
Update app.py
Browse files
app.py
CHANGED
@@ -5,11 +5,11 @@ llm = Llama(model_path="ggml-model-q4_0.bin", n_ctx=256, n_batch=128)
|
|
5 |
|
6 |
def generate_text(input_text):
|
7 |
print(input_text)
|
8 |
-
output = llm(f"### Instruction:\n{input_text}\n\n### Response:\n", max_tokens=
|
9 |
print(output)
|
10 |
return output['choices'][0]['text']
|
11 |
|
12 |
input_text = gr.inputs.Textbox(lines= 10, label="Enter your input text")
|
13 |
output_text = gr.outputs.Textbox(label="Output text")
|
14 |
|
15 |
-
gr.Interface(fn=generate_text, inputs=input_text, outputs=output_text, title="
|
|
|
5 |
|
6 |
def generate_text(input_text):
|
7 |
print(input_text)
|
8 |
+
output = llm(f"### Instruction:\n{input_text}\n\n### Response:\n", max_tokens=512, echo=False)
|
9 |
print(output)
|
10 |
return output['choices'][0]['text']
|
11 |
|
12 |
input_text = gr.inputs.Textbox(lines= 10, label="Enter your input text")
|
13 |
output_text = gr.outputs.Textbox(label="Output text")
|
14 |
|
15 |
+
gr.Interface(fn=generate_text, inputs=input_text, outputs=output_text, title="Olive").launch()
|