Update app.py
Browse files
app.py
CHANGED
@@ -8,12 +8,21 @@ from transformers import pipeline
|
|
8 |
model_name = "dolphin-phi"
|
9 |
|
10 |
# Load the chosen LLM model
|
11 |
-
llm = pipeline("text-generation", model="
|
12 |
|
13 |
#Vectara config:
|
14 |
# customer_id =
|
15 |
# corpus_id =
|
16 |
# api_key =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
import requests
|
18 |
|
19 |
# DSPy-based prompt generation
|
|
|
8 |
model_name = "dolphin-phi"
|
9 |
|
10 |
# Load the chosen LLM model
|
11 |
+
llm = pipeline("text-generation", model="TheBloke/dolphin-2_6-phi-2-GGUF")
|
12 |
|
13 |
#Vectara config:
|
14 |
# customer_id =
|
15 |
# corpus_id =
|
16 |
# api_key =
|
17 |
+
|
18 |
+
# Brought from Vectara example from Tonic. Global variables to hold component references
|
19 |
+
components = {}
|
20 |
+
dotenv.load_dotenv()
|
21 |
+
seamless_client = Client("TheBloke/dolphin-2_6-phi-2-GGUF")
|
22 |
+
HuggingFace_Token = os.getenv("HuggingFace_Token")
|
23 |
+
hf_token = os.getenv("HuggingFace_Token")
|
24 |
+
base_model_id = os.getenv('BASE_MODEL_ID', 'default_base_model_id')
|
25 |
+
model_directory = os.getenv('MODEL_DIRECTORY', 'default_model_directory')
|
26 |
import requests
|
27 |
|
28 |
# DSPy-based prompt generation
|