axadishaq commited on
Commit
dc400fa
·
verified ·
1 Parent(s): 9595d98

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,11 +1,11 @@
1
  import os
2
  from groq import Groq
3
  import gradio as gr
4
- from google.colab import userdata
5
 
6
 
7
  # Access the API key from Colab Secrets
8
- groq_api_key = userdata.get("GROQ_API_KEY")
9
  if not groq_api_key:
10
  raise ValueError("GROQ_API_KEY not found in Colab Secrets. Please add it.")
11
 
 
1
  import os
2
  from groq import Groq
3
  import gradio as gr
4
+
5
 
6
 
7
  # Access the API key from Colab Secrets
8
+ groq_api_key = os.environ.get("GROQ_API_KEY")
9
  if not groq_api_key:
10
  raise ValueError("GROQ_API_KEY not found in Colab Secrets. Please add it.")
11