Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,7 +13,7 @@ BLAXEL_BASE_URL = os.getenv("BLAXEL_BACKEND_URL")
|
|
| 13 |
BLAXEL_API_KEY = os.getenv("BLAXEL_API_KEY")
|
| 14 |
|
| 15 |
# --- Backend Client ---
|
| 16 |
-
def call_blaxel_backend(user_problem, google_key, anthropic_key, sambanova_key, openai_key):
|
| 17 |
if not BLAXEL_BASE_URL or not BLAXEL_API_KEY:
|
| 18 |
yield {status_output: "Configuration Error: Secrets not set."}
|
| 19 |
return
|
|
@@ -36,6 +36,7 @@ def call_blaxel_backend(user_problem, google_key, anthropic_key, sambanova_key,
|
|
| 36 |
"anthropic": anthropic_key or None,
|
| 37 |
"sambanova": sambanova_key or None,
|
| 38 |
"openai": openai_key or None,
|
|
|
|
| 39 |
}
|
| 40 |
}
|
| 41 |
|
|
@@ -138,6 +139,10 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="emerald", secondary_hue="slate"
|
|
| 138 |
label=f"OpenAI API Key ({config.MODELS['OpenAI']['default']}) (Optional)",
|
| 139 |
type="password"
|
| 140 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 141 |
|
| 142 |
with gr.Column(scale=1):
|
| 143 |
# Display Default Model Info here for transparency
|
|
@@ -163,7 +168,7 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="emerald", secondary_hue="slate"
|
|
| 163 |
|
| 164 |
submit_button.click(
|
| 165 |
fn=call_blaxel_backend,
|
| 166 |
-
inputs=[problem_input, google_key_input, anthropic_key_input, sambanova_key_input, openai_key_input],
|
| 167 |
outputs=[status_output, final_text_output, final_audio_output, final_json_log, progress_plot, calibration_data, cost_display]
|
| 168 |
)
|
| 169 |
|
|
|
|
| 13 |
BLAXEL_API_KEY = os.getenv("BLAXEL_API_KEY")
|
| 14 |
|
| 15 |
# --- Backend Client ---
|
| 16 |
+
def call_blaxel_backend(user_problem, google_key, anthropic_key, sambanova_key, openai_key, nebius_key):
|
| 17 |
if not BLAXEL_BASE_URL or not BLAXEL_API_KEY:
|
| 18 |
yield {status_output: "Configuration Error: Secrets not set."}
|
| 19 |
return
|
|
|
|
| 36 |
"anthropic": anthropic_key or None,
|
| 37 |
"sambanova": sambanova_key or None,
|
| 38 |
"openai": openai_key or None,
|
| 39 |
+
"nebius": nebius_key or None,
|
| 40 |
}
|
| 41 |
}
|
| 42 |
|
|
|
|
| 139 |
label=f"OpenAI API Key ({config.MODELS['OpenAI']['default']}) (Optional)",
|
| 140 |
type="password"
|
| 141 |
)
|
| 142 |
+
nebius_key_input = gr.Textbox(
|
| 143 |
+
label=f"Nebius API Key ({config.MODELS['Nebius']['default']}) (Optional)",
|
| 144 |
+
type="password"
|
| 145 |
+
)
|
| 146 |
|
| 147 |
with gr.Column(scale=1):
|
| 148 |
# Display Default Model Info here for transparency
|
|
|
|
| 168 |
|
| 169 |
submit_button.click(
|
| 170 |
fn=call_blaxel_backend,
|
| 171 |
+
inputs=[problem_input, google_key_input, anthropic_key_input, sambanova_key_input, openai_key_input, nebius_key_input],
|
| 172 |
outputs=[status_output, final_text_output, final_audio_output, final_json_log, progress_plot, calibration_data, cost_display]
|
| 173 |
)
|
| 174 |
|