rbn2008k commited on
Commit
89aaa7f
1 Parent(s): f204f05

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -6,12 +6,12 @@ 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,7 +72,7 @@ def resize_image(img):
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
 
 
6
  import json
7
  import os
8
 
9
+ from huggingface_hub import InferenceClient, login
10
  from transformers import AutoProcessor
11
 
12
  idefics_processor = AutoProcessor.from_pretrained("HuggingFaceM4/idefics2-8b")
13
 
14
+ login(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")
76
  rating_client = InferenceClient("meta-llama/Meta-Llama-3-8B-Instruct")
77
 
78