Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -2,8 +2,9 @@ import gradio as gr
|
|
2 |
from groq import Groq
|
3 |
import os
|
4 |
|
|
|
5 |
# Initialize Groq client
|
6 |
-
client = Groq(api_key=
|
7 |
|
8 |
# Function to generate responses with error handling
|
9 |
def generate_response(user_input, chat_history):
|
|
|
2 |
from groq import Groq
|
3 |
import os
|
4 |
|
5 |
+
api_key = os.getenv('GROQ_API_KEY')
|
6 |
# Initialize Groq client
|
7 |
+
client = Groq(api_key=api_key)
|
8 |
|
9 |
# Function to generate responses with error handling
|
10 |
def generate_response(user_input, chat_history):
|