Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,10 +4,12 @@ from langchain_huggingface import HuggingFaceEndpoint
|
|
| 4 |
from langchain.schema import HumanMessage, SystemMessage
|
| 5 |
import os
|
| 6 |
|
| 7 |
-
# Set up the LangChain model (using
|
| 8 |
llm = HuggingFaceEndpoint(
|
| 9 |
repo_id="HuggingFaceH4/zephyr-7b-beta",
|
| 10 |
-
|
|
|
|
|
|
|
| 11 |
)
|
| 12 |
|
| 13 |
# Create different prompt templates for different subjects
|
|
|
|
| 4 |
from langchain.schema import HumanMessage, SystemMessage
|
| 5 |
import os
|
| 6 |
|
| 7 |
+
# Set up the LangChain model (using HuggingFace Zephyr model)
|
| 8 |
llm = HuggingFaceEndpoint(
|
| 9 |
repo_id="HuggingFaceH4/zephyr-7b-beta",
|
| 10 |
+
temperature=0.7,
|
| 11 |
+
max_length=512,
|
| 12 |
+
huggingfacehub_api_token=os.getenv("HUGGINGFACEHUB_API_TOKEN")
|
| 13 |
)
|
| 14 |
|
| 15 |
# Create different prompt templates for different subjects
|