rbn2008k commited on
Commit
f204f05
1 Parent(s): ab6c07a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -4,12 +4,14 @@ from PIL import Image
4
  import base64
5
  from io import BytesIO
6
  import json
 
7
 
8
  from huggingface_hub import InferenceClient
9
  from transformers import AutoProcessor
10
 
11
  idefics_processor = AutoProcessor.from_pretrained("HuggingFaceM4/idefics2-8b")
12
 
 
13
 
14
  def process_images_and_text(image_path, query, client):
15
  messages = [
@@ -70,7 +72,7 @@ def resize_image(img):
70
  return img
71
 
72
 
73
- idefics_client = InferenceClient("HuggingFaceM4/idefics2-8b-chatty")
74
  rating_client = InferenceClient("meta-llama/Meta-Llama-3-8B-Instruct")
75
 
76
 
 
4
  import base64
5
  from io import BytesIO
6
  import json
7
+ import os
8
 
9
  from huggingface_hub import InferenceClient
10
  from transformers import AutoProcessor
11
 
12
  idefics_processor = AutoProcessor.from_pretrained("HuggingFaceM4/idefics2-8b")
13
 
14
+ hf_token = os.getenv("hf_token")
15
 
16
  def process_images_and_text(image_path, query, client):
17
  messages = [
 
72
  return img
73
 
74
 
75
+ idefics_client = InferenceClient("meta-llama/Llama-3.2-11B-Vision-Instruct", api_key=hf_token)
76
  rating_client = InferenceClient("meta-llama/Meta-Llama-3-8B-Instruct")
77
 
78