Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,13 +4,10 @@ from langchain.llms import HuggingFaceHub
|
|
| 4 |
import os
|
| 5 |
import chainlit as cl
|
| 6 |
|
| 7 |
-
# Set your HuggingFace API key in the environment variable
|
| 8 |
-
os.environ["HUGGINGFACEHUB_API_TOKEN"] = "your_huggingface_api_key"
|
| 9 |
-
|
| 10 |
# Instantiate the LLM for HuggingFace's Mixtral-8x7B-Instruct-v0.1 model
|
| 11 |
llm = HuggingFaceHub(
|
| 12 |
-
model_kwargs={"max_length":
|
| 13 |
-
repo_id="
|
| 14 |
huggingfacehub_api_token=os.environ["HUGGINGFACEHUB_API_TOKEN"],
|
| 15 |
)
|
| 16 |
|
|
|
|
| 4 |
import os
|
| 5 |
import chainlit as cl
|
| 6 |
|
|
|
|
|
|
|
|
|
|
| 7 |
# Instantiate the LLM for HuggingFace's Mixtral-8x7B-Instruct-v0.1 model
|
| 8 |
llm = HuggingFaceHub(
|
| 9 |
+
model_kwargs={"max_length": 2048},
|
| 10 |
+
repo_id="mistralai/Mixtral-8x7B-Instruct-v0.1", # Replace with the correct model repo_id
|
| 11 |
huggingfacehub_api_token=os.environ["HUGGINGFACEHUB_API_TOKEN"],
|
| 12 |
)
|
| 13 |
|