sparrow-parse 1.0.3__py3-none-any.whl → 1.0.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
sparrow_parse/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '1.0.3'
1
+ __version__ = '1.0.5'
@@ -121,8 +121,7 @@ class MLXInference(ModelInference):
121
121
  # Text-only inference
122
122
  messages = input_data[0]["text_input"]
123
123
  response = self._generate_text_response(model, processor, config, messages)
124
- results = [self.process_response(response)]
125
- print("Agent inference completed successfully")
124
+ results = [response]
126
125
  else:
127
126
  # Image-based inference
128
127
  file_paths = self._extract_file_paths(input_data)
@@ -141,7 +140,7 @@ class MLXInference(ModelInference):
141
140
  :return: Generated response
142
141
  """
143
142
  prompt = apply_chat_template(processor, config, messages)
144
- return generate(
143
+ response = generate(
145
144
  model,
146
145
  processor,
147
146
  prompt,
@@ -149,6 +148,8 @@ class MLXInference(ModelInference):
149
148
  temperature=0.0,
150
149
  verbose=False
151
150
  )
151
+ print("Inference completed successfully")
152
+ return response
152
153
 
153
154
  def _process_images(self, model, processor, config, file_paths, input_data):
154
155
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sparrow-parse
3
- Version: 1.0.3
3
+ Version: 1.0.5
4
4
  Summary: Sparrow Parse is a Python package (part of Sparrow) for parsing and extracting information from documents.
5
5
  Home-page: https://github.com/katanaml/sparrow/tree/main/sparrow-data/parse
6
6
  Author: Andrej Baranovskij
@@ -16,15 +16,15 @@ Requires-Python: >=3.10
16
16
  Description-Content-Type: text/markdown
17
17
  Requires-Dist: rich
18
18
  Requires-Dist: transformers >=4.51.3
19
- Requires-Dist: torchvision >=0.21.0
20
- Requires-Dist: torch >=2.6.0
19
+ Requires-Dist: torchvision >=0.22.0
20
+ Requires-Dist: torch >=2.7.0
21
21
  Requires-Dist: sentence-transformers >=4.1.0
22
- Requires-Dist: numpy >=2.2.4
22
+ Requires-Dist: numpy >=2.2.5
23
23
  Requires-Dist: pypdf >=5.4.0
24
24
  Requires-Dist: gradio-client >=1.7.2
25
25
  Requires-Dist: pdf2image >=1.17.0
26
- Requires-Dist: mlx >=0.25.0 ; sys_platform == "darwin" and platform_machine == "arm64"
27
- Requires-Dist: mlx-vlm ==0.1.23 ; sys_platform == "darwin" and platform_machine == "arm64"
26
+ Requires-Dist: mlx >=0.25.1 ; sys_platform == "darwin" and platform_machine == "arm64"
27
+ Requires-Dist: mlx-vlm ==0.1.25 ; sys_platform == "darwin" and platform_machine == "arm64"
28
28
 
29
29
  # Sparrow Parse
30
30
 
@@ -1,4 +1,4 @@
1
- sparrow_parse/__init__.py,sha256=MpVHFFoITiYyPltTb_qFrdeX2entdTm4x0PczXi3txY,21
1
+ sparrow_parse/__init__.py,sha256=c_ze905nYtc4YMhztpSDwQgaxCKfL3HM75hI5ocPNM8,21
2
2
  sparrow_parse/__main__.py,sha256=Xs1bpJV0n08KWOoQE34FBYn6EBXZA9HIYJKrE4ZdG78,153
3
3
  sparrow_parse/text_extraction.py,sha256=lirPpvz8tnwCMGmoHPK94-vCviybuRyQM-mpvhtp3uY,1124
4
4
  sparrow_parse/extractors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -13,9 +13,9 @@ sparrow_parse/vllm/huggingface_inference.py,sha256=EJnG6PesGKMc_0qGPN8ufE6pSnhAg
13
13
  sparrow_parse/vllm/inference_base.py,sha256=4mwGoAY63MB4cHZpV0czTkJWEzimmiTzqqzKmLNzgjw,820
14
14
  sparrow_parse/vllm/inference_factory.py,sha256=FTM65O-dW2WZchHOrNN7_Q3-FlVoAc65iSptuuUuClM,1166
15
15
  sparrow_parse/vllm/local_gpu_inference.py,sha256=aHoJTejb5xrXjWDIGu5RBQWEyRCOBCB04sMvO2Wyvg8,628
16
- sparrow_parse/vllm/mlx_inference.py,sha256=vqIkfTd5rP8bnZ8K_CGVEWe_G3E4i3rwN9MfLBDiE3c,8000
17
- sparrow_parse-1.0.3.dist-info/METADATA,sha256=dIGBhBhtR5rSKj4RbT1PhyrWxKUVUq5AxbJ33FsKNlE,7229
18
- sparrow_parse-1.0.3.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
19
- sparrow_parse-1.0.3.dist-info/entry_points.txt,sha256=HV5nnQVtr2m-kn6hzY_ynp0zugNCcGovbmnfmQgOyhw,53
20
- sparrow_parse-1.0.3.dist-info/top_level.txt,sha256=n6b-WtT91zKLyCPZTP7wvne8v_yvIahcsz-4sX8I0rY,14
21
- sparrow_parse-1.0.3.dist-info/RECORD,,
16
+ sparrow_parse/vllm/mlx_inference.py,sha256=StjoeTqhy_CKh8lM0BLIBrDeYlWY17FrxKBpdOtqD5g,7996
17
+ sparrow_parse-1.0.5.dist-info/METADATA,sha256=Bscq3CAua1yuXPcMxi10vo52fHL5UGNCpPdyn2csERQ,7229
18
+ sparrow_parse-1.0.5.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
19
+ sparrow_parse-1.0.5.dist-info/entry_points.txt,sha256=HV5nnQVtr2m-kn6hzY_ynp0zugNCcGovbmnfmQgOyhw,53
20
+ sparrow_parse-1.0.5.dist-info/top_level.txt,sha256=n6b-WtT91zKLyCPZTP7wvne8v_yvIahcsz-4sX8I0rY,14
21
+ sparrow_parse-1.0.5.dist-info/RECORD,,