Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Llama Recipes
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mirrored_repos
MachineLearning
meta-llama
Llama Recipes
Commits
3ba4b64e
Commit
3ba4b64e
authored
5 months ago
by
Himanshu Shukla
Browse files
Options
Downloads
Patches
Plain Diff
shifted the import statement at top
parent
2df7d1b6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
recipes/quickstart/inference/local_inference/multi_modal_infer.py
+1
-3
1 addition, 3 deletions
...quickstart/inference/local_inference/multi_modal_infer.py
with
1 addition
and
3 deletions
recipes/quickstart/inference/local_inference/multi_modal_infer.py
+
1
−
3
View file @
3ba4b64e
...
@@ -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.
"""
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment