KalooAI commited on
Commit
45ef991
·
verified ·
1 Parent(s): 7b597b1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -70,15 +70,14 @@ repo_id = "Qwen/Qwen2.5-7B-Instruct"
70
  # repo_id = "microsoft/Phi-3.5-mini-instruct"
71
 
72
 
73
- llm = HuggingFaceEndpoint(
74
- repo_id=repo_id,
75
- task="text-generation",
 
76
  max_new_tokens=512,
 
77
  huggingfacehub_api_token=os.getenv("HF_TOKEN"),
78
- provider = 'auto',
79
- model_kwargs={"wait_for_model": True}
80
  )
81
-
82
  # 2. ChatHuggingFace will correctly route this to the /v1/chat/completions
83
  # endpoint which the Llama-3.1-8B-Instruct model supports.
84
  # llm = ChatHuggingFace(llm=llm_endpoint)
 
70
  # repo_id = "microsoft/Phi-3.5-mini-instruct"
71
 
72
 
73
+ from langchain_huggingface import ChatHuggingFace
74
+
75
+ llm = ChatHuggingFace(
76
+ model=repo_id,
77
  max_new_tokens=512,
78
+ temperature=0.1,
79
  huggingfacehub_api_token=os.getenv("HF_TOKEN"),
 
 
80
  )
 
81
  # 2. ChatHuggingFace will correctly route this to the /v1/chat/completions
82
  # endpoint which the Llama-3.1-8B-Instruct model supports.
83
  # llm = ChatHuggingFace(llm=llm_endpoint)