drkareemkamal
commited on
Commit
•
79a8f20
1
Parent(s):
a82944c
Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,7 @@ def set_custom_prompt():
|
|
50 |
|
51 |
return prompt
|
52 |
|
53 |
-
|
54 |
def load_llm():
|
55 |
# llm = CTransformers(
|
56 |
# model = 'TheBloke/Llama-2-7B-Chat-GGML',
|
@@ -60,6 +60,7 @@ def load_llm():
|
|
60 |
# )
|
61 |
llm = HuggingFaceHub(
|
62 |
repo_id = "mistralai/Mistral-7B-v0.1",
|
|
|
63 |
model_kwargs = {'temperature': 0.1, "max_length": 500}
|
64 |
)
|
65 |
return llm
|
|
|
50 |
|
51 |
return prompt
|
52 |
|
53 |
+
os.environ['HUGGINGFACEHUB_API_TOKEN'] = os.getenv('HUGGINGFACEHUB_API_TOKEN')
|
54 |
def load_llm():
|
55 |
# llm = CTransformers(
|
56 |
# model = 'TheBloke/Llama-2-7B-Chat-GGML',
|
|
|
60 |
# )
|
61 |
llm = HuggingFaceHub(
|
62 |
repo_id = "mistralai/Mistral-7B-v0.1",
|
63 |
+
huggingfacehub_api_token=os.getenv('HUGGINGFACEHUB_API_TOKEN'),
|
64 |
model_kwargs = {'temperature': 0.1, "max_length": 500}
|
65 |
)
|
66 |
return llm
|