jordyvl commited on
Commit
0b94be0
1 Parent(s): 1af211c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -14,6 +14,9 @@ from PIL import Image
14
 
15
  import gradio as gr
16
 
 
 
 
17
 
18
  def messages_to_prompt(messages):
19
  prompt = ""
@@ -50,8 +53,8 @@ def load_RAG_pipeline():
50
  )
51
 
52
  llm = HuggingFaceLLM(
53
- model_name="HuggingFaceH4/zephyr-7b-alpha",
54
- tokenizer_name="HuggingFaceH4/zephyr-7b-alpha",
55
  query_wrapper_prompt=PromptTemplate("<|system|>\n</s>\n<|user|>\n{query_str}</s>\n<|assistant|>\n"),
56
  context_window=3900,
57
  max_new_tokens=256,
 
14
 
15
  import gradio as gr
16
 
17
+ CHEAPMODE=True
18
+ LLM = "HuggingFaceH4/zephyr-7b-alpha" if not CHEAPMODE else "microsoft/phi-2"
19
+
20
 
21
  def messages_to_prompt(messages):
22
  prompt = ""
 
53
  )
54
 
55
  llm = HuggingFaceLLM(
56
+ model_name=LLM,
57
+ tokenizer_name=LLM,
58
  query_wrapper_prompt=PromptTemplate("<|system|>\n</s>\n<|user|>\n{query_str}</s>\n<|assistant|>\n"),
59
  context_window=3900,
60
  max_new_tokens=256,