jdesiree commited on
Commit
a232a34
·
verified ·
1 Parent(s): bd52050

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
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 the same Zephyr model)
8
  llm = HuggingFaceEndpoint(
9
  repo_id="HuggingFaceH4/zephyr-7b-beta",
10
- model_kwargs={"temperature": 0.7, "max_length": 512}
 
 
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