Spaces:
Paused
Paused
Update app.py
Browse files
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=
|
54 |
-
tokenizer_name=
|
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,
|