sparrow-parse 0.4.9__py3-none-any.whl → 0.4.11__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__ = '0.4.9'
1
+ __version__ = '0.4.11'
@@ -4,9 +4,8 @@ from mlx_vlm.utils import load_image
4
4
  from sparrow_parse.vllm.inference_base import ModelInference
5
5
  import os
6
6
  import json
7
- from rich.console import Console
7
+ from rich import print
8
8
 
9
- console = Console()
10
9
 
11
10
  class MLXInference(ModelInference):
12
11
  """
@@ -21,7 +20,7 @@ class MLXInference(ModelInference):
21
20
  :param model_name: Name of the model to load.
22
21
  """
23
22
  self.model_name = model_name
24
- console.print(f"MLXInference initialized for model: {model_name}")
23
+ print(f"MLXInference initialized for model: {model_name}")
25
24
 
26
25
 
27
26
  @staticmethod
@@ -33,7 +32,7 @@ class MLXInference(ModelInference):
33
32
  :return: Tuple containing the loaded model and processor.
34
33
  """
35
34
  model, processor = load(model_name)
36
- console.print(f"Loaded model: {model_name}")
35
+ print(f"Loaded model: {model_name}")
37
36
  return model, processor
38
37
 
39
38
 
@@ -54,7 +53,7 @@ class MLXInference(ModelInference):
54
53
  formatted_json = json.loads(cleaned_text)
55
54
  return json.dumps(formatted_json, indent=2)
56
55
  except json.JSONDecodeError as e:
57
- console.print(f"Failed to parse JSON in MLX inference backend: {e}")
56
+ print(f"Failed to parse JSON in MLX inference backend: {e}")
58
57
  return output_text
59
58
 
60
59
 
@@ -122,7 +121,7 @@ class MLXInference(ModelInference):
122
121
  )
123
122
  results.append(self.process_response(response))
124
123
 
125
- console.print("Inference completed successfully for: ", file_path)
124
+ print("Inference completed successfully for: ", file_path)
126
125
 
127
126
  return results
128
127
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sparrow-parse
3
- Version: 0.4.9
3
+ Version: 0.4.11
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
@@ -23,7 +23,7 @@ Requires-Dist: numpy==2.1.3
23
23
  Requires-Dist: pypdf==4.3.0
24
24
  Requires-Dist: gradio-client
25
25
  Requires-Dist: pdf2image
26
- Requires-Dist: mlx-vlm==0.1.4; sys_platform == "darwin" and platform_machine == "arm64"
26
+ Requires-Dist: mlx-vlm==0.1.6; sys_platform == "darwin" and platform_machine == "arm64"
27
27
 
28
28
  # Sparrow Parse
29
29
 
@@ -1,4 +1,4 @@
1
- sparrow_parse/__init__.py,sha256=HVLYuTxwxepBhsoeROAeognEnSW-LkbZ_mSNgbAcTqA,21
1
+ sparrow_parse/__init__.py,sha256=_dncCaBlNMKpdGc_5P3CWO1jkZu1tnuJ5OY_FmPU7T4,22
2
2
  sparrow_parse/__main__.py,sha256=Xs1bpJV0n08KWOoQE34FBYn6EBXZA9HIYJKrE4ZdG78,153
3
3
  sparrow_parse/extractors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  sparrow_parse/extractors/vllm_extractor.py,sha256=PDLgLlKiq3Bv-UOQTzX3AgxNOLcEU2EniGAXLjMC30U,7820
@@ -11,9 +11,9 @@ sparrow_parse/vllm/huggingface_inference.py,sha256=EJnG6PesGKMc_0qGPN8ufE6pSnhAg
11
11
  sparrow_parse/vllm/inference_base.py,sha256=4mwGoAY63MB4cHZpV0czTkJWEzimmiTzqqzKmLNzgjw,820
12
12
  sparrow_parse/vllm/inference_factory.py,sha256=FTM65O-dW2WZchHOrNN7_Q3-FlVoAc65iSptuuUuClM,1166
13
13
  sparrow_parse/vllm/local_gpu_inference.py,sha256=aHoJTejb5xrXjWDIGu5RBQWEyRCOBCB04sMvO2Wyvg8,628
14
- sparrow_parse/vllm/mlx_inference.py,sha256=jlycb0WwpQKGkfCrYYgirOdXrqEV6RROB86dmBvAlrU,4961
15
- sparrow_parse-0.4.9.dist-info/METADATA,sha256=vunHfk8AaOMZGvmR-5oeph45PBfJMiiYKRbSBGZ-AGA,6432
16
- sparrow_parse-0.4.9.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
17
- sparrow_parse-0.4.9.dist-info/entry_points.txt,sha256=8CrvTVTTcz1YuZ8aRCYNOH15ZOAaYLlcbYX3t28HwJY,54
18
- sparrow_parse-0.4.9.dist-info/top_level.txt,sha256=n6b-WtT91zKLyCPZTP7wvne8v_yvIahcsz-4sX8I0rY,14
19
- sparrow_parse-0.4.9.dist-info/RECORD,,
14
+ sparrow_parse/vllm/mlx_inference.py,sha256=eFyi42-ju28Eb6bzFj0xa5UUaOV68SR12vL4O3vaD9s,4899
15
+ sparrow_parse-0.4.11.dist-info/METADATA,sha256=U3OqgrKK7rDIMmhJz1x8jclP6uYGZSI0XfQ_EfiWPZQ,6433
16
+ sparrow_parse-0.4.11.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
17
+ sparrow_parse-0.4.11.dist-info/entry_points.txt,sha256=8CrvTVTTcz1YuZ8aRCYNOH15ZOAaYLlcbYX3t28HwJY,54
18
+ sparrow_parse-0.4.11.dist-info/top_level.txt,sha256=n6b-WtT91zKLyCPZTP7wvne8v_yvIahcsz-4sX8I0rY,14
19
+ sparrow_parse-0.4.11.dist-info/RECORD,,