Spaces:
Running
Running
arhanovich
commited on
Commit
•
530b8bf
1
Parent(s):
0650e1f
Update app.py
Browse files
app.py
CHANGED
@@ -2,15 +2,10 @@ import os
|
|
2 |
import gradio as gr
|
3 |
import json
|
4 |
from groq import Groq
|
5 |
-
from dotenv import load_dotenv
|
6 |
|
7 |
-
# Load environment variables from .env file
|
8 |
-
load_dotenv()
|
9 |
-
|
10 |
-
# Get the API key from the environment variable
|
11 |
api_key = os.getenv('API_KEY')
|
12 |
if not api_key or api_key == "your-api-key-here":
|
13 |
-
raise ValueError("Please set the API_KEY
|
14 |
|
15 |
client = Groq(api_key=api_key)
|
16 |
|
|
|
2 |
import gradio as gr
|
3 |
import json
|
4 |
from groq import Groq
|
|
|
5 |
|
|
|
|
|
|
|
|
|
6 |
api_key = os.getenv('API_KEY')
|
7 |
if not api_key or api_key == "your-api-key-here":
|
8 |
+
raise ValueError("Please set the API_KEY as an environment variable")
|
9 |
|
10 |
client = Groq(api_key=api_key)
|
11 |
|