Imnotchis commited on
Commit
92e9b5d
·
verified ·
1 Parent(s): 2eaf431

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +20 -0
app.py CHANGED
@@ -454,7 +454,27 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
454
  print(status_message)
455
  results_df = pd.DataFrame(results_log)
456
  return status_message, results_df
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
457
 
 
458
 
459
  # --- Build Gradio Interface using Blocks ---
460
  with gr.Blocks() as demo:
 
454
  print(status_message)
455
  results_df = pd.DataFrame(results_log)
456
  return status_message, results_df
457
+ def list_groq_models():
458
+ response = requests.get(
459
+ "https://api.groq.com/openai/v1/models",
460
+ headers={
461
+ "Authorization": f"Bearer {os.environ['GROQ_API_KEY']}"
462
+ },
463
+ timeout=20
464
+ )
465
+
466
+ response.raise_for_status()
467
+
468
+ models = sorted(
469
+ model["id"] for model in response.json()["data"]
470
+ )
471
+
472
+ print("\n========== GROQ MODELS ==========")
473
+ for model_id in models:
474
+ print(model_id)
475
+ print("=================================\n")
476
 
477
+ list_groq_models()
478
 
479
  # --- Build Gradio Interface using Blocks ---
480
  with gr.Blocks() as demo: