Spaces:
Sleeping
Sleeping
Update QnA.py
Browse files
QnA.py
CHANGED
@@ -56,9 +56,9 @@ def summarize(documents,llm):
|
|
56 |
return results['output_text']
|
57 |
|
58 |
|
59 |
-
def get_hugging_face_model(model_id='mistralai/
|
60 |
llm = HuggingFaceHub(
|
61 |
-
huggingfacehub_api_token =api_key
|
62 |
repo_id=model_id,
|
63 |
model_kwargs={"temperature":temperature, "max_new_tokens":max_tokens}
|
64 |
)
|
|
|
56 |
return results['output_text']
|
57 |
|
58 |
|
59 |
+
def get_hugging_face_model(model_id='mistralai/Mistral-7B-Instruct-v0.2',temperature=0.01,max_tokens=4096,api_key=None):
|
60 |
llm = HuggingFaceHub(
|
61 |
+
huggingfacehub_api_token =api_key,
|
62 |
repo_id=model_id,
|
63 |
model_kwargs={"temperature":temperature, "max_new_tokens":max_tokens}
|
64 |
)
|