Commit ·
3fa379b
1
Parent(s): a3e904b
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,18 +14,18 @@ subprocess.run('pip install llama-cpp-agent==0.2.10', shell=True)
|
|
| 14 |
|
| 15 |
from llama_cpp import Llama
|
| 16 |
|
| 17 |
-
hf_hub_download(
|
| 18 |
-
repo_id="QuantFactory/Meta-Llama-3-8B-Instruct-GGUF",
|
| 19 |
-
filename="Meta-Llama-3-8B-Instruct.Q8_0.gguf",
|
| 20 |
-
local_dir = "./models"
|
| 21 |
-
)
|
| 22 |
-
|
| 23 |
# hf_hub_download(
|
| 24 |
-
# repo_id="
|
| 25 |
-
# filename="Meta-Llama-3-
|
| 26 |
# local_dir = "./models"
|
| 27 |
# )
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
def process_document(pdf_path, page_ids=None):
|
| 30 |
extracted_pages = extract_pages(pdf_path, page_numbers=page_ids)
|
| 31 |
|
|
@@ -135,7 +135,7 @@ def pdf_to_text(files, maxtokens=2048, temperature=0, top_probability=0.95):
|
|
| 135 |
|
| 136 |
|
| 137 |
# model_id = "Meta-Llama-3-8B-Instruct.Q8_0.gguf"
|
| 138 |
-
model_id = "models/
|
| 139 |
model = Llama(model_path=model_id, n_ctx=2048, n_threads=8, n_gpu_layers=-1, n_batch=128)
|
| 140 |
|
| 141 |
css = ".gradio-container {background: 'logo.png'}"
|
|
|
|
| 14 |
|
| 15 |
from llama_cpp import Llama
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
# hf_hub_download(
|
| 18 |
+
# repo_id="QuantFactory/Meta-Llama-3-8B-Instruct-GGUF",
|
| 19 |
+
# filename="Meta-Llama-3-8B-Instruct.Q8_0.gguf",
|
| 20 |
# local_dir = "./models"
|
| 21 |
# )
|
| 22 |
|
| 23 |
+
hf_hub_download(
|
| 24 |
+
repo_id="bartowski/Llama-3-8B-Instruct-Gradient-1048k-GGUF",
|
| 25 |
+
filename="Llama-3-8B-Instruct-Gradient-1048k-Q8_0.gguf",
|
| 26 |
+
local_dir = "./models"
|
| 27 |
+
)
|
| 28 |
+
|
| 29 |
def process_document(pdf_path, page_ids=None):
|
| 30 |
extracted_pages = extract_pages(pdf_path, page_numbers=page_ids)
|
| 31 |
|
|
|
|
| 135 |
|
| 136 |
|
| 137 |
# model_id = "Meta-Llama-3-8B-Instruct.Q8_0.gguf"
|
| 138 |
+
model_id = "models/Llama-3-8B-Instruct-Gradient-1048k-Q8_0.gguf"
|
| 139 |
model = Llama(model_path=model_id, n_ctx=2048, n_threads=8, n_gpu_layers=-1, n_batch=128)
|
| 140 |
|
| 141 |
css = ".gradio-container {background: 'logo.png'}"
|