Spaces:
Running
Running
srinidhidevaraj
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -12,29 +12,10 @@ from accelerate import init_empty_weights
|
|
12 |
from transformers import AutoProcessor, AutoModelForPreTraining
|
13 |
from transformers import MllamaForConditionalGeneration, AutoProcessor
|
14 |
|
15 |
-
# Configure Gemini API
|
16 |
-
# genai.configure(api_key=os.getenv("gkey2"))
|
17 |
|
18 |
-
# Define the prompt template
|
19 |
-
# prompt = ChatPromptTemplate.from_messages(
|
20 |
-
# [
|
21 |
-
# ("system", "You are a helpful assistant. Please respond to the user's queries."),
|
22 |
-
# ("user", "Question: {question}")
|
23 |
-
# ]
|
24 |
-
# )
|
25 |
|
26 |
prompt="<|image|><|begin_of_text|>You are a helpful assistant. Please respond to the user's queries."
|
27 |
|
28 |
-
# Initialize the Llama model
|
29 |
-
# model = Ollama(model="llama3.2")
|
30 |
-
|
31 |
-
|
32 |
-
# model = MllamaForConditionalGeneration.from_pretrained(
|
33 |
-
# model_id,
|
34 |
-
# torch_dtype=torch.bfloat16,
|
35 |
-
# device_map="auto",
|
36 |
-
# )
|
37 |
-
# processor = AutoProcessor.from_pretrained(model_id)
|
38 |
|
39 |
|
40 |
model_id = "meta-llama/Llama-3.2-11B-Vision"
|
|
|
12 |
from transformers import AutoProcessor, AutoModelForPreTraining
|
13 |
from transformers import MllamaForConditionalGeneration, AutoProcessor
|
14 |
|
|
|
|
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
prompt="<|image|><|begin_of_text|>You are a helpful assistant. Please respond to the user's queries."
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
|
21 |
model_id = "meta-llama/Llama-3.2-11B-Vision"
|