Spaces:
Running
Running
Commit
·
e221206
1
Parent(s):
166d9fd
add api key to groq
Browse files
app.py
CHANGED
@@ -8,6 +8,7 @@ import torch
|
|
8 |
import subprocess
|
9 |
from groq import Groq
|
10 |
import base64
|
|
|
11 |
|
12 |
subprocess.run("rm -rf /data-nvme/zerogpu-offload/*", env={}, shell=True)
|
13 |
|
@@ -70,7 +71,9 @@ def generate_description_fn(
|
|
70 |
):
|
71 |
base64_image = encode_image(image)
|
72 |
|
73 |
-
client = Groq(
|
|
|
|
|
74 |
|
75 |
chat_completion = client.chat.completions.create(
|
76 |
messages=[
|
|
|
8 |
import subprocess
|
9 |
from groq import Groq
|
10 |
import base64
|
11 |
+
import os
|
12 |
|
13 |
subprocess.run("rm -rf /data-nvme/zerogpu-offload/*", env={}, shell=True)
|
14 |
|
|
|
71 |
):
|
72 |
base64_image = encode_image(image)
|
73 |
|
74 |
+
client = Groq(
|
75 |
+
api_key=os.environ.get("GROQ_API_KEY"),
|
76 |
+
)
|
77 |
|
78 |
chat_completion = client.chat.completions.create(
|
79 |
messages=[
|