cat-llm 0.0.54__py3-none-any.whl → 0.0.55__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.
- {cat_llm-0.0.54.dist-info → cat_llm-0.0.55.dist-info}/METADATA +2 -1
- {cat_llm-0.0.54.dist-info → cat_llm-0.0.55.dist-info}/RECORD +8 -8
- catllm/CERAD_functions.py +1 -1
- catllm/__about__.py +1 -1
- catllm/image_functions.py +3 -3
- catllm/text_functions.py +9 -3
- {cat_llm-0.0.54.dist-info → cat_llm-0.0.55.dist-info}/WHEEL +0 -0
- {cat_llm-0.0.54.dist-info → cat_llm-0.0.55.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cat-llm
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.55
|
|
4
4
|
Summary: A tool for categorizing text data and images using LLMs and vision models
|
|
5
5
|
Project-URL: Documentation, https://github.com/chrissoria/cat-llm#readme
|
|
6
6
|
Project-URL: Issues, https://github.com/chrissoria/cat-llm/issues
|
|
@@ -21,6 +21,7 @@ Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
|
21
21
|
Requires-Python: >=3.8
|
|
22
22
|
Requires-Dist: openai
|
|
23
23
|
Requires-Dist: pandas
|
|
24
|
+
Requires-Dist: random
|
|
24
25
|
Requires-Dist: requests
|
|
25
26
|
Requires-Dist: tqdm
|
|
26
27
|
Description-Content-Type: text/markdown
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
catllm/CERAD_functions.py,sha256=
|
|
2
|
-
catllm/__about__.py,sha256=
|
|
1
|
+
catllm/CERAD_functions.py,sha256=ZCKyCiv-2eUPzJ7Yhrz4Y0OJK4iEyWMnOUI7mFDsoEI,22471
|
|
2
|
+
catllm/__about__.py,sha256=VaZlPOW_B39qUtTpqKKsmCDpMCtV8MCv3LFokpKtjVI,404
|
|
3
3
|
catllm/__init__.py,sha256=sf02zp7N0NW0mAQi7eQ4gliWR1EwoqvXkHN2HwwjcTE,372
|
|
4
4
|
catllm/build_web_research.py,sha256=CYGhxnonJLBw80ATEBkpRjOKJgCYntHTgx4s4Pb8g88,6833
|
|
5
|
-
catllm/image_functions.py,sha256=
|
|
6
|
-
catllm/text_functions.py,sha256=
|
|
5
|
+
catllm/image_functions.py,sha256=8dUpwHwVe4Vf06wjFNgLnh54q5upo4E-P87-TKaSECE,35519
|
|
6
|
+
catllm/text_functions.py,sha256=iAfd6roKxxSrrKQ4VvEc5y_ZWyIgW9fVzQOaDITyFDU,18116
|
|
7
7
|
catllm/images/circle.png,sha256=JWujAWAh08-TajAoEr_TAeFNLlfbryOLw6cgIBREBuQ,86202
|
|
8
8
|
catllm/images/cube.png,sha256=nFec3e5bmRe4zrBCJ8QK-HcJLrG7u7dYdKhmdMfacfE,77275
|
|
9
9
|
catllm/images/diamond.png,sha256=rJDZKtsnBGRO8FPA0iHuA8FvHFGi9PkI_DWSFdw6iv0,99568
|
|
10
10
|
catllm/images/overlapping_pentagons.png,sha256=VO5plI6eoVRnjfqinn1nNzsCP2WQhuQy71V0EASouW4,71208
|
|
11
11
|
catllm/images/rectangles.png,sha256=2XM16HO9EYWj2yHgN4bPXaCwPfl7iYQy0tQUGaJX9xg,40692
|
|
12
|
-
cat_llm-0.0.
|
|
13
|
-
cat_llm-0.0.
|
|
14
|
-
cat_llm-0.0.
|
|
15
|
-
cat_llm-0.0.
|
|
12
|
+
cat_llm-0.0.55.dist-info/METADATA,sha256=rOd1FlzPT3uFmUb4vdyaBPrVaI-zyt3ZRcBsYLGY3f8,21521
|
|
13
|
+
cat_llm-0.0.55.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
14
|
+
cat_llm-0.0.55.dist-info/licenses/LICENSE,sha256=Vje2sS5WV4TnIwY5uQHrF4qnBAM3YOk1pGpdH0ot-2o,34969
|
|
15
|
+
cat_llm-0.0.55.dist-info/RECORD,,
|
catllm/CERAD_functions.py
CHANGED
|
@@ -378,7 +378,7 @@ def cerad_drawn_score(
|
|
|
378
378
|
image_files.reset_index(drop=True) if isinstance(image_files, (pd.DataFrame, pd.Series))
|
|
379
379
|
else pd.Series(image_files)
|
|
380
380
|
),
|
|
381
|
-
'
|
|
381
|
+
'model_response': pd.Series(link1).reset_index(drop=True),
|
|
382
382
|
'json': pd.Series(extracted_jsons).reset_index(drop=True)
|
|
383
383
|
})
|
|
384
384
|
categorized_data = pd.concat([categorized_data, normalized_data], axis=1)
|
catllm/__about__.py
CHANGED
catllm/image_functions.py
CHANGED
|
@@ -225,7 +225,7 @@ def image_multi_class(
|
|
|
225
225
|
# Save progress so far
|
|
226
226
|
temp_df = pd.DataFrame({
|
|
227
227
|
'image_input': image_files[:i+1],
|
|
228
|
-
'
|
|
228
|
+
'model_response': link1,
|
|
229
229
|
'json': extracted_jsons
|
|
230
230
|
})
|
|
231
231
|
# Normalize processed jsons so far
|
|
@@ -522,7 +522,7 @@ def image_score_drawing(
|
|
|
522
522
|
# Save progress so far
|
|
523
523
|
temp_df = pd.DataFrame({
|
|
524
524
|
'image_input': image_files[:i+1],
|
|
525
|
-
'
|
|
525
|
+
'model_response': link1,
|
|
526
526
|
'json': extracted_jsons
|
|
527
527
|
})
|
|
528
528
|
# Normalize processed jsons so far
|
|
@@ -844,7 +844,7 @@ def image_features(
|
|
|
844
844
|
image_files.reset_index(drop=True) if isinstance(image_files, (pd.DataFrame, pd.Series))
|
|
845
845
|
else pd.Series(image_files)
|
|
846
846
|
),
|
|
847
|
-
'
|
|
847
|
+
'model_response': pd.Series(link1).reset_index(drop=True),
|
|
848
848
|
'json': pd.Series(extracted_jsons).reset_index(drop=True)
|
|
849
849
|
})
|
|
850
850
|
categorized_data = pd.concat([categorized_data, normalized_data], axis=1)
|
catllm/text_functions.py
CHANGED
|
@@ -227,6 +227,7 @@ def multi_class(
|
|
|
227
227
|
user_model="gpt-4o",
|
|
228
228
|
creativity=0,
|
|
229
229
|
safety=False,
|
|
230
|
+
to_csv=False,
|
|
230
231
|
filename="categorized_data.csv",
|
|
231
232
|
save_directory=None,
|
|
232
233
|
model_source="OpenAI"
|
|
@@ -390,7 +391,7 @@ Provide your work in JSON format where the number belonging to each category is
|
|
|
390
391
|
normalized_data_list.append(pd.DataFrame({"1": ["e"]}))
|
|
391
392
|
normalized_data = pd.concat(normalized_data_list, ignore_index=True)
|
|
392
393
|
temp_df = pd.concat([temp_df, normalized_data], axis=1)
|
|
393
|
-
#
|
|
394
|
+
# save to CSV
|
|
394
395
|
if save_directory is None:
|
|
395
396
|
save_directory = os.getcwd()
|
|
396
397
|
temp_df.to_csv(os.path.join(save_directory, filename), index=False)
|
|
@@ -405,13 +406,18 @@ Provide your work in JSON format where the number belonging to each category is
|
|
|
405
406
|
normalized_data_list.append(pd.DataFrame({"1": ["e"]}))
|
|
406
407
|
normalized_data = pd.concat(normalized_data_list, ignore_index=True)
|
|
407
408
|
categorized_data = pd.DataFrame({
|
|
408
|
-
'
|
|
409
|
+
'survey_input': (
|
|
409
410
|
survey_input.reset_index(drop=True) if isinstance(survey_input, (pd.DataFrame, pd.Series))
|
|
410
411
|
else pd.Series(survey_input)
|
|
411
412
|
),
|
|
412
|
-
'
|
|
413
|
+
'model_response': pd.Series(link1).reset_index(drop=True),
|
|
413
414
|
'json': pd.Series(extracted_jsons).reset_index(drop=True)
|
|
414
415
|
})
|
|
415
416
|
categorized_data = pd.concat([categorized_data, normalized_data], axis=1)
|
|
417
|
+
|
|
418
|
+
if to_csv:
|
|
419
|
+
if save_directory is None:
|
|
420
|
+
save_directory = os.getcwd()
|
|
421
|
+
categorized_data.to_csv(os.path.join(save_directory, filename), index=False)
|
|
416
422
|
|
|
417
423
|
return categorized_data
|
|
File without changes
|
|
File without changes
|