Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -62,15 +62,17 @@ def retrieve_similar_chunks(query, index, chunks, model):
|
|
62 |
return []
|
63 |
|
64 |
# Load environment variables
|
65 |
-
|
66 |
-
groq_api_key =
|
|
|
67 |
if not groq_api_key:
|
68 |
-
st.error("The GROQ_API_KEY
|
69 |
exit()
|
70 |
|
71 |
# Initialize Groq client
|
72 |
groq_client = Groq(api_key=groq_api_key)
|
73 |
|
|
|
74 |
def query_llm(prompt, model="llama3-8b-8192"):
|
75 |
try:
|
76 |
response = groq_client.chat.completions.create(
|
|
|
62 |
return []
|
63 |
|
64 |
# Load environment variables
|
65 |
+
# Initialize Groq client with direct API key
|
66 |
+
groq_api_key = "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"
|
67 |
+
|
68 |
if not groq_api_key:
|
69 |
+
st.error("The GROQ_API_KEY is not set.")
|
70 |
exit()
|
71 |
|
72 |
# Initialize Groq client
|
73 |
groq_client = Groq(api_key=groq_api_key)
|
74 |
|
75 |
+
|
76 |
def query_llm(prompt, model="llama3-8b-8192"):
|
77 |
try:
|
78 |
response = groq_client.chat.completions.create(
|