NCTCMumbai commited on
Commit
1d687c9
1 Parent(s): 1255916

Update backend/query_llm.py

Browse files
Files changed (1) hide show
  1. backend/query_llm.py +8 -8
backend/query_llm.py CHANGED
@@ -15,8 +15,8 @@ import gradio as gr
15
  #from gradio_multimodalchatbot import MultimodalChatbot
16
  from gradio.data_classes import FileData
17
 
18
- tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.2")
19
- #tokenizer = AutoTokenizer.from_pretrained("mistralai/Mixtral-8x7B-Instruct-v0.1")
20
  # temperature = 0.2
21
  # #top_p = 0.6
22
  # repetition_penalty = 1.0
@@ -31,15 +31,15 @@ genai.configure(api_key=GOOGLE_API_KEY)
31
  OPENAI_KEY = getenv("OPENAI_API_KEY")
32
  HF_TOKEN = getenv("HUGGING_FACE_HUB_TOKEN")
33
 
34
- hf_client = InferenceClient(
35
- "mistralai/Mistral-7B-Instruct-v0.1",
36
- token=HF_TOKEN
37
- )
38
-
39
  # hf_client = InferenceClient(
40
- # "mistralai/Mixtral-8x7B-Instruct-v0.1",
41
  # token=HF_TOKEN
42
  # )
 
 
 
 
 
43
  def format_prompt(message: str, api_kind: str):
44
  """
45
  Formats the given message using a chat template.
 
15
  #from gradio_multimodalchatbot import MultimodalChatbot
16
  from gradio.data_classes import FileData
17
 
18
+ #tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.2")
19
+ tokenizer = AutoTokenizer.from_pretrained("mistralai/Mixtral-8x7B-Instruct-v0.1")
20
  # temperature = 0.2
21
  # #top_p = 0.6
22
  # repetition_penalty = 1.0
 
31
  OPENAI_KEY = getenv("OPENAI_API_KEY")
32
  HF_TOKEN = getenv("HUGGING_FACE_HUB_TOKEN")
33
 
 
 
 
 
 
34
  # hf_client = InferenceClient(
35
+ # "mistralai/Mistral-7B-Instruct-v0.1",
36
  # token=HF_TOKEN
37
  # )
38
+
39
+ hf_client = InferenceClient(
40
+ "mistralai/Mixtral-8x7B-Instruct-v0.1",
41
+ token=HF_TOKEN
42
+ )
43
  def format_prompt(message: str, api_kind: str):
44
  """
45
  Formats the given message using a chat template.