Update app.py
Browse files
app.py
CHANGED
@@ -1,16 +1,15 @@
|
|
|
|
1 |
import gradio as gr
|
2 |
import shutil
|
3 |
import os
|
4 |
import subprocess
|
|
|
|
|
5 |
from llama_index.core.llms import ChatMessage
|
6 |
-
from llama_index.
|
7 |
-
from llama_index.core import SimpleDirectoryReader, VectorStoreIndex
|
8 |
-
from llama_index.core.node_parser import SentenceSplitter
|
9 |
from llama_index.embeddings.huggingface import HuggingFaceEmbedding
|
10 |
-
from llama_index.core import Settings
|
11 |
-
from llama_cpp import Llama
|
12 |
from huggingface_hub import hf_hub_download
|
13 |
-
from
|
14 |
|
15 |
# Fungsi untuk memasang ulang llama-cpp-python dengan dukungan CUDA
|
16 |
def install_llama_with_cuda():
|
|
|
1 |
+
# Import Library yang Diperlukan
|
2 |
import gradio as gr
|
3 |
import shutil
|
4 |
import os
|
5 |
import subprocess
|
6 |
+
from llama_cpp import Llama
|
7 |
+
from llama_index.core import SimpleDirectoryReader, VectorStoreIndex, Settings
|
8 |
from llama_index.core.llms import ChatMessage
|
9 |
+
from llama_index.llms.llama_cpp import LlamaCPP
|
|
|
|
|
10 |
from llama_index.embeddings.huggingface import HuggingFaceEmbedding
|
|
|
|
|
11 |
from huggingface_hub import hf_hub_download
|
12 |
+
from llama_index.core.node_parser import SentenceSplitter
|
13 |
|
14 |
# Fungsi untuk memasang ulang llama-cpp-python dengan dukungan CUDA
|
15 |
def install_llama_with_cuda():
|