hasnanmr commited on
Commit
34d69b0
·
1 Parent(s): 3935790

modify groq import

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,5 +1,5 @@
1
  import os
2
- import groqclient
3
  import gradio as gr
4
  import numpy as np
5
  from sentence_transformers import SentenceTransformer
@@ -10,7 +10,7 @@ from tqdm import tqdm
10
 
11
  # Get the Groq API key from environment variables (in Hugging Face, this is stored as a secret)
12
  api_key = os.getenv('GROQ_API_KEY')
13
- groqclient.api_key = api_key
14
 
15
 
16
  con = sqlite3.connect("file::memory:?cache=shared")
 
1
  import os
2
+ from groq import Groq
3
  import gradio as gr
4
  import numpy as np
5
  from sentence_transformers import SentenceTransformer
 
10
 
11
  # Get the Groq API key from environment variables (in Hugging Face, this is stored as a secret)
12
  api_key = os.getenv('GROQ_API_KEY')
13
+ client = Groq(api_key)
14
 
15
 
16
  con = sqlite3.connect("file::memory:?cache=shared")