Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
| 74 |
-
|
| 75 |
-
|
|
|
|
| 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)
|