Skip to content
Snippets Groups Projects
Commit 3ba4b64e authored by Himanshu Shukla's avatar Himanshu Shukla
Browse files

shifted the import statement at top

parent 2df7d1b6
No related branches found
No related tags found
No related merge requests found
...@@ -7,8 +7,7 @@ from PIL import Image as PIL_Image ...@@ -7,8 +7,7 @@ from PIL import Image as PIL_Image
from transformers import MllamaForConditionalGeneration, MllamaProcessor from transformers import MllamaForConditionalGeneration, MllamaProcessor
from peft import PeftModel from peft import PeftModel
import gradio as gr import gradio as gr
from huggingface_hub import login from huggingface_hub import HfFolder
# Initialize accelerator # Initialize accelerator
accelerator = Accelerator() accelerator = Accelerator()
device = accelerator.device device = accelerator.device
...@@ -18,7 +17,6 @@ DEFAULT_MODEL = "meta-llama/Llama-3.2-11B-Vision-Instruct" ...@@ -18,7 +17,6 @@ DEFAULT_MODEL = "meta-llama/Llama-3.2-11B-Vision-Instruct"
MAX_OUTPUT_TOKENS = 2048 MAX_OUTPUT_TOKENS = 2048
MAX_IMAGE_SIZE = (1120, 1120) MAX_IMAGE_SIZE = (1120, 1120)
from huggingface_hub import HfFolder
def get_hf_token(): def get_hf_token():
"""Retrieve Hugging Face token from the cache or environment.""" """Retrieve Hugging Face token from the cache or environment."""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment