Spaces:
Sleeping
Sleeping
Upload 22 files
Browse files
app.py
CHANGED
|
@@ -306,9 +306,9 @@ def _run_text_inference_with_model(primary_model_id: str, prompt: str, max_token
|
|
| 306 |
"temperature": NVIDIA_TEMPERATURE,
|
| 307 |
"top_p": NVIDIA_TOP_P,
|
| 308 |
"stream": True,
|
| 309 |
-
"include_reasoning": False,
|
| 310 |
-
"chat_template_kwargs": {"enable_thinking": NVIDIA_ENABLE_THINKING},
|
| 311 |
}
|
|
|
|
|
|
|
| 312 |
headers = {
|
| 313 |
"Authorization": f"Bearer {api_key}",
|
| 314 |
"Accept": "text/event-stream",
|
|
@@ -2051,9 +2051,9 @@ def run_nvidia_inference(image: Image.Image, prompt: str, max_tokens: int = NVID
|
|
| 2051 |
"temperature": NVIDIA_TEMPERATURE,
|
| 2052 |
"top_p": NVIDIA_TOP_P,
|
| 2053 |
"stream": True,
|
| 2054 |
-
"include_reasoning": False,
|
| 2055 |
-
"chat_template_kwargs": {"enable_thinking": NVIDIA_ENABLE_THINKING},
|
| 2056 |
}
|
|
|
|
|
|
|
| 2057 |
headers = {
|
| 2058 |
"Authorization": f"Bearer {api_key}",
|
| 2059 |
"Accept": "text/event-stream",
|
|
@@ -2139,9 +2139,9 @@ def run_nvidia_text_inference(prompt: str, max_tokens: int = OUTFIT_TEXT_SELECTO
|
|
| 2139 |
"temperature": NVIDIA_TEMPERATURE,
|
| 2140 |
"top_p": NVIDIA_TOP_P,
|
| 2141 |
"stream": True,
|
| 2142 |
-
"include_reasoning": False,
|
| 2143 |
-
"chat_template_kwargs": {"enable_thinking": NVIDIA_ENABLE_THINKING},
|
| 2144 |
}
|
|
|
|
|
|
|
| 2145 |
headers = {
|
| 2146 |
"Authorization": f"Bearer {api_key}",
|
| 2147 |
"Accept": "text/event-stream",
|
|
|
|
| 306 |
"temperature": NVIDIA_TEMPERATURE,
|
| 307 |
"top_p": NVIDIA_TOP_P,
|
| 308 |
"stream": True,
|
|
|
|
|
|
|
| 309 |
}
|
| 310 |
+
if NVIDIA_ENABLE_THINKING:
|
| 311 |
+
payload["chat_template_kwargs"] = {"enable_thinking": True}
|
| 312 |
headers = {
|
| 313 |
"Authorization": f"Bearer {api_key}",
|
| 314 |
"Accept": "text/event-stream",
|
|
|
|
| 2051 |
"temperature": NVIDIA_TEMPERATURE,
|
| 2052 |
"top_p": NVIDIA_TOP_P,
|
| 2053 |
"stream": True,
|
|
|
|
|
|
|
| 2054 |
}
|
| 2055 |
+
if NVIDIA_ENABLE_THINKING:
|
| 2056 |
+
payload["chat_template_kwargs"] = {"enable_thinking": True}
|
| 2057 |
headers = {
|
| 2058 |
"Authorization": f"Bearer {api_key}",
|
| 2059 |
"Accept": "text/event-stream",
|
|
|
|
| 2139 |
"temperature": NVIDIA_TEMPERATURE,
|
| 2140 |
"top_p": NVIDIA_TOP_P,
|
| 2141 |
"stream": True,
|
|
|
|
|
|
|
| 2142 |
}
|
| 2143 |
+
if NVIDIA_ENABLE_THINKING:
|
| 2144 |
+
payload["chat_template_kwargs"] = {"enable_thinking": True}
|
| 2145 |
headers = {
|
| 2146 |
"Authorization": f"Bearer {api_key}",
|
| 2147 |
"Accept": "text/event-stream",
|