hgdgng commited on
Commit
08c738e
1 Parent(s): 57cdcfe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -2
app.py CHANGED
@@ -3,8 +3,11 @@ from transformers import pipeline
3
 
4
  # Load the large language model (LLM)
5
  try:
6
- print("Loading the language model...")
7
- llm_pipeline = pipeline("text-generation", model = AutoModelForPreTraining.from_pretrained("meta-llama/Llama-3.2-11B-Vision-Instruct") # You can use a different model here
 
 
 
8
  print("Model loaded successfully!")
9
  except Exception as e:
10
  print(f"Error loading model: {e}")
 
3
 
4
  # Load the large language model (LLM)
5
  try:
6
+ # Load model directly
7
+ from transformers import AutoProcessor, AutoModelForPreTraining
8
+
9
+ processor = AutoProcessor.from_pretrained("meta-llama/Llama-3.2-11B-Vision-Instruct")
10
+ model = AutoModelForPreTraining.from_pretrained("meta-llama/Llama-3.2-11B-Vision-Instruct") # You can use a different model here
11
  print("Model loaded successfully!")
12
  except Exception as e:
13
  print(f"Error loading model: {e}")