Update app.py
Browse files
app.py
CHANGED
@@ -7,13 +7,16 @@ from llama_index.embeddings.langchain import LangchainEmbedding
|
|
7 |
from llama_index.core import PromptHelper
|
8 |
from typing import Optional, List, Mapping, Any
|
9 |
import pandas as pd
|
10 |
-
|
|
|
11 |
# Set the page config as the first command
|
12 |
st.set_page_config(page_title='Mental Heallth chatbot', page_icon=':robot_face:', layout='wide')
|
13 |
|
14 |
# Define constants
|
15 |
MODEL_NAME = 'TheBloke/MelloGPT-GGUF'
|
16 |
-
MODEL_PATH =
|
|
|
|
|
17 |
KNOWLEDGE_BASE_FILE = "mentalhealth.csv"
|
18 |
|
19 |
# Configuration
|
|
|
7 |
from llama_index.core import PromptHelper
|
8 |
from typing import Optional, List, Mapping, Any
|
9 |
import pandas as pd
|
10 |
+
# Load model directly
|
11 |
+
from transformers import AutoModel
|
12 |
# Set the page config as the first command
|
13 |
st.set_page_config(page_title='Mental Heallth chatbot', page_icon=':robot_face:', layout='wide')
|
14 |
|
15 |
# Define constants
|
16 |
MODEL_NAME = 'TheBloke/MelloGPT-GGUF'
|
17 |
+
MODEL_PATH = AutoModel.from_pretrained("TheBloke/MelloGPT-GGUF")
|
18 |
+
|
19 |
+
#MODEL_PATH = 'TheBloke/MelloGPT-GGUF'
|
20 |
KNOWLEDGE_BASE_FILE = "mentalhealth.csv"
|
21 |
|
22 |
# Configuration
|