Spaces:
Build error
Build error
create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# !pip install llama-cpp-python
|
2 |
+
import gradio as gr
|
3 |
+
from huggingface_hub import InferenceClient
|
4 |
+
from llama_cpp import Llama
|
5 |
+
|
6 |
+
llm = Llama.from_pretrained(
|
7 |
+
repo_id="gultar/OpenHermes-Llama-3b-GGUF",
|
8 |
+
filename="openhermes-llama-3b-q5_0.gguf",
|
9 |
+
)
|
10 |
+
|
11 |
+
output = llm(
|
12 |
+
"Once upon a time,",
|
13 |
+
max_tokens=512,
|
14 |
+
echo=True
|
15 |
+
)
|
16 |
+
|
17 |
+
print(output)
|