Spaces:
Configuration error
Configuration error
Update agent.py
Browse files
agent.py
CHANGED
@@ -26,6 +26,7 @@ from llama_index.core.schema import ImageNode, TextNode
|
|
26 |
# LlamaIndex specialized imports
|
27 |
from llama_index.embeddings.huggingface import HuggingFaceEmbedding
|
28 |
from llama_index.llms.huggingface import HuggingFaceLLM
|
|
|
29 |
from llama_index.readers.assemblyai import AssemblyAIAudioTranscriptReader
|
30 |
from llama_index.readers.json import JSONReader
|
31 |
from llama_index.readers.web import BeautifulSoupWebReader
|
@@ -118,11 +119,10 @@ def initialize_models(use_api_mode=False):
|
|
118 |
print("Initializing models in non-API mode with local models...")
|
119 |
|
120 |
try :
|
121 |
-
pixtral_model = "Prarabdha/pixtral-12b-240910-hf"
|
122 |
# Fallback to regular HuggingFace LLM
|
123 |
-
proj_llm =
|
124 |
-
model_name=
|
125 |
-
tokenizer_name=
|
126 |
device_map="auto",
|
127 |
max_new_tokens=16000,
|
128 |
model_kwargs={"torch_dtype": "auto"},
|
|
|
26 |
# LlamaIndex specialized imports
|
27 |
from llama_index.embeddings.huggingface import HuggingFaceEmbedding
|
28 |
from llama_index.llms.huggingface import HuggingFaceLLM
|
29 |
+
from llama_index.multi_modal_llms.huggingface import HuggingFaceMultiModal
|
30 |
from llama_index.readers.assemblyai import AssemblyAIAudioTranscriptReader
|
31 |
from llama_index.readers.json import JSONReader
|
32 |
from llama_index.readers.web import BeautifulSoupWebReader
|
|
|
119 |
print("Initializing models in non-API mode with local models...")
|
120 |
|
121 |
try :
|
|
|
122 |
# Fallback to regular HuggingFace LLM
|
123 |
+
proj_llm = HuggingFaceMultiModal(
|
124 |
+
model_name="mistralai/Pixtral-12B-2409",
|
125 |
+
tokenizer_name="mistralai/Pixtral-12B-2409",
|
126 |
device_map="auto",
|
127 |
max_new_tokens=16000,
|
128 |
model_kwargs={"torch_dtype": "auto"},
|