jrkotun commited on
Commit
02717d7
·
verified ·
1 Parent(s): 7f27ea8

Update src/streamlit_app.py

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +6 -3
src/streamlit_app.py CHANGED
@@ -4,7 +4,7 @@ import numpy as np
4
  import pandas as pd
5
  from sentence_transformers import SentenceTransformer
6
  import pickle
7
- from langchain_ollama import ChatOllama
8
  from transformers import AutoTokenizer, AutoModel
9
  import torch
10
 
@@ -63,8 +63,11 @@ def get_ollama_explanation(query, description):
63
  response = llm.invoke(prompt)
64
  return response.content.strip()
65
 
66
- # Load Ollama
67
- llm = ChatOllama(model="llama3.2")
 
 
 
68
 
69
  # Initialize app
70
  st.set_page_config(page_title="Fragrance Recommendation System", layout="wide")
 
4
  import pandas as pd
5
  from sentence_transformers import SentenceTransformer
6
  import pickle
7
+ from langchain_huggingface import HuggingFaceEndpoint
8
  from transformers import AutoTokenizer, AutoModel
9
  import torch
10
 
 
63
  response = llm.invoke(prompt)
64
  return response.content.strip()
65
 
66
+ # Load LLM
67
+ llm = HuggingFaceEndpoint(
68
+ repo_id="mistralai/Mistral-7B-Instruct-v0.3",
69
+ huggingfacehub_api_token=os.environ["HF_TOKEN"]
70
+ )
71
 
72
  # Initialize app
73
  st.set_page_config(page_title="Fragrance Recommendation System", layout="wide")