Spaces:
Sleeping
Sleeping
ddovidovich
commited on
Commit
·
5e36062
1
Parent(s):
062df6a
new changes
Browse files- app.py +5 -0
- requirements.txt +3 -1
app.py
CHANGED
@@ -6,6 +6,11 @@ import numpy as np
|
|
6 |
from tqdm.auto import tqdm
|
7 |
from sentence_transformers import SentenceTransformer
|
8 |
import torch
|
|
|
|
|
|
|
|
|
|
|
9 |
|
10 |
def list_to_numpy(obj):
|
11 |
if isinstance(obj, list):
|
|
|
6 |
from tqdm.auto import tqdm
|
7 |
from sentence_transformers import SentenceTransformer
|
8 |
import torch
|
9 |
+
import llama_cpp
|
10 |
+
from llama_cpp import Llama
|
11 |
+
from huggingface_hub import hf_hub_download
|
12 |
+
|
13 |
+
llm = Llama(model_path= hf_hub_download(repo_id="TheBloke/Llama-2-7b-Chat-GGUF", filename="llama-2-7b-chat.Q4_K_M.gguf"), n_ctx=2048)
|
14 |
|
15 |
def list_to_numpy(obj):
|
16 |
if isinstance(obj, list):
|
requirements.txt
CHANGED
@@ -2,4 +2,6 @@ streamlit
|
|
2 |
torch
|
3 |
faiss-cpu
|
4 |
sentence_transformers
|
5 |
-
tqdm
|
|
|
|
|
|
2 |
torch
|
3 |
faiss-cpu
|
4 |
sentence_transformers
|
5 |
+
tqdm
|
6 |
+
llama-cpp-python
|
7 |
+
huggingface_hub
|