Upload 2 files
Browse files- app.py +2 -1
- requirements.txt +1 -1
app.py
CHANGED
@@ -1,9 +1,10 @@
|
|
1 |
import gradio as gr
|
2 |
from llama_cpp import Llama
|
3 |
|
4 |
-
|
5 |
|
6 |
def generate_text(prompt):
|
|
|
7 |
output = llm(prompt, max_tokens=468, temperature=0.1, top_p=0.5, echo=False, stop=["#"])
|
8 |
text = output['choices'][0]['text']
|
9 |
return text
|
|
|
1 |
import gradio as gr
|
2 |
from llama_cpp import Llama
|
3 |
|
4 |
+
|
5 |
|
6 |
def generate_text(prompt):
|
7 |
+
llm = Llama(model_path="vicuna-AlekseyKorshuk-7B-GPTQ-4bit-128g.GGML.bin", n_ctx=2048)
|
8 |
output = llm(prompt, max_tokens=468, temperature=0.1, top_p=0.5, echo=False, stop=["#"])
|
9 |
text = output['choices'][0]['text']
|
10 |
return text
|
requirements.txt
CHANGED
@@ -1 +1 @@
|
|
1 |
-
llama-cpp-python
|
|
|
1 |
+
llama-cpp-python
|