Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
|
2 |
import gradio as gr
|
3 |
import os
|
4 |
from llama_index.core import StorageContext, load_index_from_storage, VectorStoreIndex, SimpleDirectoryReader, ChatPromptTemplate, Settings
|
@@ -23,8 +23,8 @@ cred = credentials.Certificate("redfernstech-fd8fe-firebase-adminsdk-g9vcn-0537b
|
|
23 |
firebase_admin.initialize_app(cred, {"databaseURL": "https://redfernstech-fd8fe-default-rtdb.firebaseio.com/"})
|
24 |
# Configure the Llama index settings
|
25 |
Settings.llm = HuggingFaceInferenceAPI(
|
26 |
-
model_name="
|
27 |
-
tokenizer_name="
|
28 |
context_window=3000,
|
29 |
token=os.getenv("HF_TOKEN"),
|
30 |
max_new_tokens=512,
|
|
|
1 |
+
from dotenv import load_dotenv
|
2 |
import gradio as gr
|
3 |
import os
|
4 |
from llama_index.core import StorageContext, load_index_from_storage, VectorStoreIndex, SimpleDirectoryReader, ChatPromptTemplate, Settings
|
|
|
23 |
firebase_admin.initialize_app(cred, {"databaseURL": "https://redfernstech-fd8fe-default-rtdb.firebaseio.com/"})
|
24 |
# Configure the Llama index settings
|
25 |
Settings.llm = HuggingFaceInferenceAPI(
|
26 |
+
model_name="mistralai/Mistral-7B-Instruct-v0.3",
|
27 |
+
tokenizer_name="mistralai/Mistral-7B-Instruct-v0.3",
|
28 |
context_window=3000,
|
29 |
token=os.getenv("HF_TOKEN"),
|
30 |
max_new_tokens=512,
|