Spaces:
Sleeping
Sleeping
Kesheratmex
commited on
Commit
·
34ee155
1
Parent(s):
4c0f990
Add MODEL_ID env var to override GPT model selection
Browse filesThis change allows the GPT model to be specified via the `MODEL_ID` environment variable, enabling dynamic model selection and providing debug output for the chosen model.
app.py
CHANGED
|
@@ -356,7 +356,10 @@ def generar_analisis_fuerte(media_path):
|
|
| 356 |
narrative = None
|
| 357 |
if GPTClass:
|
| 358 |
try:
|
| 359 |
-
|
|
|
|
|
|
|
|
|
|
| 360 |
# DEBUG: print prompt (truncated) so Space logs show the request
|
| 361 |
try:
|
| 362 |
print("DEBUG: [gpt] sending prompt (truncated 2000 chars):")
|
|
|
|
| 356 |
narrative = None
|
| 357 |
if GPTClass:
|
| 358 |
try:
|
| 359 |
+
# Allow overriding model via env var MODEL_ID (e.g. "openai/gpt-oss-120b:fireworks-ai")
|
| 360 |
+
model_id = os.getenv("MODEL_ID", "gpt-oss-120")
|
| 361 |
+
print(f"DEBUG: [gpt] using model_id={model_id}, HF_USE_ROUTER={os.getenv('HF_USE_ROUTER')}")
|
| 362 |
+
wrapper = GPTClass(model=model_id)
|
| 363 |
# DEBUG: print prompt (truncated) so Space logs show the request
|
| 364 |
try:
|
| 365 |
print("DEBUG: [gpt] sending prompt (truncated 2000 chars):")
|