KvrParaskevi
commited on
Commit
•
7500084
1
Parent(s):
8ab4ca8
Update chatbot.py
Browse files- chatbot.py +3 -10
chatbot.py
CHANGED
@@ -13,17 +13,10 @@ token = os.getenv('HUGGINGFACEHUB_API_TOKEN')
|
|
13 |
|
14 |
@st.cache_resource
|
15 |
def load_model():
|
16 |
-
|
17 |
-
|
18 |
|
19 |
-
|
20 |
-
model_identifier = "KvrParaskevi/Hotel-Assistant-Attempt4-Llama-2-7b"
|
21 |
-
task = "text-classification" # Change this to your model's task
|
22 |
-
|
23 |
-
# Load the model using the pipeline
|
24 |
-
model_pipeline = pipeline(task, model=model_identifier)
|
25 |
-
|
26 |
-
return model_pipeline
|
27 |
|
28 |
def demo_miny_memory(model):
|
29 |
# llm_data = get_Model(hugging_face_key)
|
|
|
13 |
|
14 |
@st.cache_resource
|
15 |
def load_model():
|
16 |
+
tokenizer = AutoTokenizer.from_pretrained("KvrParaskevi/Hotel-Assistant-Attempt4-Llama-2-7b")
|
17 |
+
model = AutoModelForCausalLM.from_pretrained("KvrParaskevi/Hotel-Assistant-Attempt4-Llama-2-7b")
|
18 |
|
19 |
+
return tokenizer,model
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
def demo_miny_memory(model):
|
22 |
# llm_data = get_Model(hugging_face_key)
|