Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -66,13 +66,16 @@ from langchain_huggingface import HuggingFaceEndpoint, ChatHuggingFace
|
|
| 66 |
# repo_id = "Qwen/Qwen2.5-7B-Instruct"
|
| 67 |
# repo_id = "google/gemma-2-2b-it"
|
| 68 |
# repo_id = "mistralai/Mistral-7B-Instruct-v0.3"
|
| 69 |
-
repo_id = "HuggingFaceTB/SmolLM2-1.7B-Instruct"
|
|
|
|
|
|
|
| 70 |
|
| 71 |
llm = HuggingFaceEndpoint(
|
| 72 |
repo_id=repo_id,
|
| 73 |
task="text-generation",
|
| 74 |
max_new_tokens=512,
|
| 75 |
huggingfacehub_api_token=os.getenv("HF_TOKEN"),
|
|
|
|
| 76 |
)
|
| 77 |
|
| 78 |
# 2. ChatHuggingFace will correctly route this to the /v1/chat/completions
|
|
|
|
| 66 |
# repo_id = "Qwen/Qwen2.5-7B-Instruct"
|
| 67 |
# repo_id = "google/gemma-2-2b-it"
|
| 68 |
# repo_id = "mistralai/Mistral-7B-Instruct-v0.3"
|
| 69 |
+
# repo_id = "HuggingFaceTB/SmolLM2-1.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 |
+
model_kwargs={"wait_for_model": True}
|
| 79 |
)
|
| 80 |
|
| 81 |
# 2. ChatHuggingFace will correctly route this to the /v1/chat/completions
|