Geraldine commited on
Commit
8a2f928
·
1 Parent(s): 9b7d010

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -23,10 +23,9 @@ def define_embeddings_llm(openai_key):
23
  embeddings = HuggingFaceEmbeddings(
24
  model_name="sentence-transformers/all-MiniLM-L6-v2"
25
  )
26
- llm = HuggingFaceHub(repo_id="MBZUAI/LaMini-Flan-T5-248M",
27
- model_kwargs={"max_length":2048,
28
- "temperature":0.2}
29
- )
30
  langchain.llm_cache = InMemoryCache()
31
  return embeddings,llm
32
 
 
23
  embeddings = HuggingFaceEmbeddings(
24
  model_name="sentence-transformers/all-MiniLM-L6-v2"
25
  )
26
+ model_id = "lmsys/vicuna-7b-v1.3"
27
+ pipe = pipeline("text-generation", model=model, max_length=2048)
28
+ llm = HuggingFacePipeline(pipeline=pipe)
 
29
  langchain.llm_cache = InMemoryCache()
30
  return embeddings,llm
31