Spaces:
Runtime error
Runtime error
Abhishek Mamdapure
commited on
Commit
·
d5821df
1
Parent(s):
faadb9d
added examples to python file
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ llm = Llama(model_path="ggml-alpaca-7b-q4.bin")
|
|
5 |
|
6 |
def generate_text(input_text):
|
7 |
output = llm(input_text, max_tokens=256, stop=["Q:", "\n"], echo=True)
|
8 |
-
return output['choices']['text']
|
9 |
|
10 |
input_text = gr.inputs.Textbox(label="Enter your input text")
|
11 |
output_text = gr.outputs.Textbox(label="Output text")
|
|
|
5 |
|
6 |
def generate_text(input_text):
|
7 |
output = llm(input_text, max_tokens=256, stop=["Q:", "\n"], echo=True)
|
8 |
+
return output['choices'][0]['text']
|
9 |
|
10 |
input_text = gr.inputs.Textbox(label="Enter your input text")
|
11 |
output_text = gr.outputs.Textbox(label="Output text")
|