Jiangxz01 commited on
Commit
7fb1b17
·
verified ·
1 Parent(s): b1bc271

Upload app.py

Browse files

Llama 3.2 90B Vision

Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -30,6 +30,8 @@ def process_image(image_path, api_key, question):
30
  image_b64 = base64.b64encode(compressed_image).decode()
31
  assert len(image_b64) < 180_000, \
32
  "Image is still too large after compression. Please try a smaller image."
 
 
33
  prompt = f"{question} . Must reply to me in \"Traditional Chinese\"."
34
  headers = {
35
  "Authorization": f"Bearer {api_key}",
 
30
  image_b64 = base64.b64encode(compressed_image).decode()
31
  assert len(image_b64) < 180_000, \
32
  "Image is still too large after compression. Please try a smaller image."
33
+ if not api_key:
34
+ api_key = os.getenv("YOUR_API_KEY")
35
  prompt = f"{question} . Must reply to me in \"Traditional Chinese\"."
36
  headers = {
37
  "Authorization": f"Bearer {api_key}",