Pavan178 commited on
Commit
85ae387
1 Parent(s): 1b2c6b8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -28,7 +28,7 @@ import re
28
  list_llm = ["mistralai/Mistral-7B-Instruct-v0.2", "mistralai/Mixtral-8x7B-Instruct-v0.1", "mistralai/Mistral-7B-Instruct-v0.1", \
29
  "google/gemma-7b-it","google/gemma-2b-it", \
30
  "HuggingFaceH4/zephyr-7b-beta", "HuggingFaceH4/zephyr-7b-gemma-v0.1", \
31
- "meta-llama/Meta-Llama-3-8B-Instruct", "microsoft/phi-2", \
32
  "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "mosaicml/mpt-7b-instruct", "tiiuae/falcon-7b-instruct", \
33
  "google/flan-t5-xxl"
34
  ]
@@ -152,6 +152,16 @@ def initialize_llmchain(llm_model, temperature, max_tokens, top_k, vector_db, pr
152
  #huggingfacehub_api_token = huggingfacehub_api_token,
153
  top_k = top_k,
154
  )
 
 
 
 
 
 
 
 
 
 
155
  else:
156
  llm = HuggingFaceEndpoint(
157
  repo_id=llm_model,
 
28
  list_llm = ["mistralai/Mistral-7B-Instruct-v0.2", "mistralai/Mixtral-8x7B-Instruct-v0.1", "mistralai/Mistral-7B-Instruct-v0.1", \
29
  "google/gemma-7b-it","google/gemma-2b-it", \
30
  "HuggingFaceH4/zephyr-7b-beta", "HuggingFaceH4/zephyr-7b-gemma-v0.1", \
31
+ "meta-llama/Meta-Llama-3-8B-Instruct","meta-llama/Meta-Llama-3.1-8B-Instruct", "microsoft/phi-2", \
32
  "TinyLlama/TinyLlama-1.1B-Chat-v1.0", "mosaicml/mpt-7b-instruct", "tiiuae/falcon-7b-instruct", \
33
  "google/flan-t5-xxl"
34
  ]
 
152
  #huggingfacehub_api_token = huggingfacehub_api_token,
153
  top_k = top_k,
154
  )
155
+ elif llm_model == "meta-llama/Meta-Llama-3.1-8B-Instruct":
156
+ #raise gr.Error("Llama-2-7b-chat-hf model requires a Pro subscription...")
157
+ llm = HuggingFaceEndpoint(
158
+ repo_id=llm_model,
159
+ # model_kwargs={"temperature": temperature, "max_new_tokens": max_tokens, "top_k": top_k}
160
+ temperature = temperature,
161
+ max_new_tokens = 450
162
+ #huggingfacehub_api_token = huggingfacehub_api_token,
163
+ top_k = top_k,
164
+ )
165
  else:
166
  llm = HuggingFaceEndpoint(
167
  repo_id=llm_model,