Pavan178 commited on
Commit
1b2c6b8
1 Parent(s): 550bd79

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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.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
  ]
@@ -142,14 +142,14 @@ def initialize_llmchain(llm_model, temperature, max_tokens, top_k, vector_db, pr
142
  max_new_tokens = 250,
143
  top_k = top_k,
144
  )
145
- elif llm_model == "meta-llama/Meta-Llama-3.1-8B-Instruct":
146
- raise gr.Error("Llama-2-7b-chat-hf model requires a Pro subscription...")
147
  llm = HuggingFaceEndpoint(
148
  repo_id=llm_model,
149
  # model_kwargs={"temperature": temperature, "max_new_tokens": max_tokens, "top_k": top_k}
150
  temperature = temperature,
151
  max_new_tokens = max_tokens,
152
- huggingfacehub_api_token = huggingfacehub_api_token,
153
  top_k = top_k,
154
  )
155
  else:
 
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
  ]
 
142
  max_new_tokens = 250,
143
  top_k = top_k,
144
  )
145
+ elif llm_model == "meta-llama/Meta-Llama-3-8B-Instruct":
146
+ #raise gr.Error("Llama-2-7b-chat-hf model requires a Pro subscription...")
147
  llm = HuggingFaceEndpoint(
148
  repo_id=llm_model,
149
  # model_kwargs={"temperature": temperature, "max_new_tokens": max_tokens, "top_k": top_k}
150
  temperature = temperature,
151
  max_new_tokens = max_tokens,
152
+ #huggingfacehub_api_token = huggingfacehub_api_token,
153
  top_k = top_k,
154
  )
155
  else: