zac commited on
Commit
4eae1dc
·
1 Parent(s): 54e0678

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -7,6 +7,7 @@ from huggingface_hub import hf_hub_download #load from huggingfaces
7
 
8
 
9
  llm = Llama(model_path= hf_hub_download(repo_id="TheBloke/Vigogne-2-7B-Instruct-GGML", filename="vigogne-2-7b-instruct.ggmlv3.q4_1.bin"))
 
10
 
11
  def generate_text(input_text):
12
  output = llm(f"Q: {input_text} A:", max_tokens=521, stop=["Q:", "\n"], echo=True)
 
7
 
8
 
9
  llm = Llama(model_path= hf_hub_download(repo_id="TheBloke/Vigogne-2-7B-Instruct-GGML", filename="vigogne-2-7b-instruct.ggmlv3.q4_1.bin"))
10
+ llm.load_model() #pre load model(as suggested by chatGPT)
11
 
12
  def generate_text(input_text):
13
  output = llm(f"Q: {input_text} A:", max_tokens=521, stop=["Q:", "\n"], echo=True)