Spaces:
Runtime error
Runtime error
Ankitajadhav
commited on
Commit
•
ae3604c
1
Parent(s):
7aafc6d
Update app.py
Browse files
app.py
CHANGED
@@ -9,8 +9,8 @@ import chromadb
|
|
9 |
from datasets import load_dataset
|
10 |
# from transformers import AutoModelForCausalLM, AutoTokenizer
|
11 |
import gradio as gr
|
12 |
-
from
|
13 |
-
|
14 |
|
15 |
|
16 |
# Function to clear the cache
|
@@ -86,10 +86,9 @@ vector_store.populate_vectors(dataset=None)
|
|
86 |
# load model orca-mini general purpose model
|
87 |
# tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.3")
|
88 |
# model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.3")
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
model = GPT4All(model_name=model_name, model_path=model_path,device="cuda")
|
93 |
|
94 |
# Define the chatbot response function
|
95 |
def chatbot_response(user_input):
|
|
|
9 |
from datasets import load_dataset
|
10 |
# from transformers import AutoModelForCausalLM, AutoTokenizer
|
11 |
import gradio as gr
|
12 |
+
from transformers import AutoTokenizer, MistralForCausalLM
|
13 |
+
|
14 |
|
15 |
|
16 |
# Function to clear the cache
|
|
|
86 |
# load model orca-mini general purpose model
|
87 |
# tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.3")
|
88 |
# model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.3")
|
89 |
+
|
90 |
+
model = MistralForCausalLM.from_pretrained("mistralai/Mistral-7B-v0.1")
|
91 |
+
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1")
|
|
|
92 |
|
93 |
# Define the chatbot response function
|
94 |
def chatbot_response(user_input):
|