flutterbasit commited on
Commit
1bfe0c3
·
verified ·
1 Parent(s): 07a560d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -62,15 +62,17 @@ def retrieve_similar_chunks(query, index, chunks, model):
62
  return []
63
 
64
  # Load environment variables
65
- load_dotenv()
66
- groq_api_key = os.getenv("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")
 
67
  if not groq_api_key:
68
- st.error("The GROQ_API_KEY environment variable is not set.")
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(