Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -101,9 +101,9 @@ class BasicAgent:
|
|
| 101 |
|
| 102 |
# Groq model
|
| 103 |
self.model = RetryOpenAIModel(
|
| 104 |
-
model_id="
|
| 105 |
-
api_base="https://
|
| 106 |
-
api_key=os.environ["
|
| 107 |
client_kwargs={
|
| 108 |
"timeout": 60.0,
|
| 109 |
"max_retries": 0
|
|
@@ -405,20 +405,7 @@ with gr.Blocks() as demo:
|
|
| 405 |
fn=run_and_submit_all,
|
| 406 |
outputs=[status_output, results_table]
|
| 407 |
)
|
| 408 |
-
print("Testing Hugging Face Inference...")
|
| 409 |
|
| 410 |
-
from test_hf import client
|
| 411 |
-
|
| 412 |
-
try:
|
| 413 |
-
response = client.chat.completions.create(
|
| 414 |
-
model="speakleash/Bielik-11B-v3.0-Instruct:publicai",
|
| 415 |
-
messages=[{"role": "user", "content": "Say hello."}],
|
| 416 |
-
max_tokens=30
|
| 417 |
-
)
|
| 418 |
-
print("TEST SUCCESS:", response.choices[0].message.content)
|
| 419 |
-
except Exception as e:
|
| 420 |
-
print("TEST FAILED:", e)
|
| 421 |
-
|
| 422 |
if __name__ == "__main__":
|
| 423 |
print("\n" + "-"*30 + " App Starting " + "-"*30)
|
| 424 |
# Check for SPACE_HOST and SPACE_ID at startup for information
|
|
|
|
| 101 |
|
| 102 |
# Groq model
|
| 103 |
self.model = RetryOpenAIModel(
|
| 104 |
+
model_id="qwen/qwen3.8-27b",
|
| 105 |
+
api_base="https://api.groq.com/openai/v1",
|
| 106 |
+
api_key=os.environ["GROQ_API_KEY"],
|
| 107 |
client_kwargs={
|
| 108 |
"timeout": 60.0,
|
| 109 |
"max_retries": 0
|
|
|
|
| 405 |
fn=run_and_submit_all,
|
| 406 |
outputs=[status_output, results_table]
|
| 407 |
)
|
|
|
|
| 408 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 409 |
if __name__ == "__main__":
|
| 410 |
print("\n" + "-"*30 + " App Starting " + "-"*30)
|
| 411 |
# Check for SPACE_HOST and SPACE_ID at startup for information
|