khababakhtar commited on
Commit
512a676
·
verified ·
1 Parent(s): 214b23d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -3,12 +3,12 @@ import groq
3
  import gradio as gr
4
  import sys
5
 
6
- # Retrieve the API key from the environment variable
7
- api_key = os.getenv("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")
8
 
9
  # Check if the API key is available
10
  if not api_key:
11
- print("❌ Error: GROQ_API_KEY is not set. Please add it in Hugging Face 'Settings' → 'Secrets'.")
12
  sys.exit(1) # Exit the program if the API key is not available
13
 
14
  # Initialize the Groq client with the API key
 
3
  import gradio as gr
4
  import sys
5
 
6
+ # Manually set the API key here
7
+ api_key = "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" # Replace with your actual API key
8
 
9
  # Check if the API key is available
10
  if not api_key:
11
+ print("❌ Error: GROQ_API_KEY is not set. Please add it manually in the script.")
12
  sys.exit(1) # Exit the program if the API key is not available
13
 
14
  # Initialize the Groq client with the API key