Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
|
|
|
|
|
| 1 |
import os
|
| 2 |
import gradio as gr
|
| 3 |
import copy
|
| 4 |
from llama_cpp import Llama
|
| 5 |
from huggingface_hub import hf_hub_download
|
| 6 |
|
|
|
|
| 7 |
|
| 8 |
try:
|
| 9 |
llm = Llama(
|
| 10 |
model_path=hf_hub_download(
|
| 11 |
-
repo_id=
|
| 12 |
-
filename=
|
| 13 |
),
|
| 14 |
n_ctx=2048,
|
| 15 |
n_gpu_layers=-1, # change n_gpu_layers if you have more or less VRAM
|
| 16 |
)
|
|
|
|
| 17 |
|
| 18 |
except Exception as e:
|
| 19 |
print(e)
|
|
|
|
| 1 |
+
print("START: BEFORE IMPORTS")
|
| 2 |
+
|
| 3 |
import os
|
| 4 |
import gradio as gr
|
| 5 |
import copy
|
| 6 |
from llama_cpp import Llama
|
| 7 |
from huggingface_hub import hf_hub_download
|
| 8 |
|
| 9 |
+
print("START: AFTER IMPORTS")
|
| 10 |
|
| 11 |
try:
|
| 12 |
llm = Llama(
|
| 13 |
model_path=hf_hub_download(
|
| 14 |
+
repo_id="microsoft/Phi-3-mini-4k-instruct-gguf",
|
| 15 |
+
filename="*q4.gguf",
|
| 16 |
),
|
| 17 |
n_ctx=2048,
|
| 18 |
n_gpu_layers=-1, # change n_gpu_layers if you have more or less VRAM
|
| 19 |
)
|
| 20 |
+
print("START: AFTER LLAMA-CPP SETUP")
|
| 21 |
|
| 22 |
except Exception as e:
|
| 23 |
print(e)
|