-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
LIZARD-OFFICIAL-77
committed
Oct 27, 2024
1 parent
90c7130
commit a619862
Showing
4 changed files
with
140 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Publish to PyPI | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build-n-publish: | ||
name: Build and publish to PyPI | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Set up Python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: '3.12' | ||
- name: Install pypa/setuptools | ||
run: >- | ||
python -m | ||
pip install wheel | ||
- name: Extract tag name | ||
id: tag | ||
run: echo ::set-output name=TAG_NAME::$(echo $GITHUB_REF | cut -d / -f 3) | ||
- name: Update version in setup.py | ||
run: >- | ||
sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.tag.outputs.TAG_NAME }}/g" setup.py | ||
- name: Build a binary wheel | ||
run: >- | ||
python setup.py sdist bdist_wheel | ||
- name: Publish distribution to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# SpiceJack | ||
|
||
SpiceJack is a tool for generating json questions and answers from documents in python. | ||
|
||
## Usage | ||
|
||
```python | ||
from spicejack.pdf import PDFprocessor | ||
|
||
def filter1(list): | ||
""" | ||
Example filter | ||
""" | ||
return [i.replace("badword","b*dword") for i in list] | ||
|
||
|
||
processor = PDFprocessor( | ||
"/path/to/Tax_Evasion_Tutorial.pdf", | ||
use_legitimate = True, # Runs the processor with the openai api (See "legitimate use") | ||
filters = (filter1,) # Extra custom filters | ||
) | ||
|
||
processor.run( | ||
thread = True # Runs the processor in a child thread. (threading.Thread) | ||
process = True # Runs the processor in a child thread. (multiprocessing.Process) | ||
logging = True # Prints the responses from the LLM | ||
) | ||
|
||
``` | ||
|
||
## Legitimate use | ||
|
||
Create a file named .env and put this: | ||
|
||
```dotenv | ||
OPENAI_API_KEY = "<YOUR-OPENAI-API-KEY>" | ||
``` | ||
|
||
## Installation | ||
|
||
```bash | ||
pip install spicejack | ||
``` | ||
|
||
## Support me | ||
|
||
You can use SpiceJack for completely free, but donations are very appreciated as I am making this on an 10+ year old laptop. | ||
|
||
### Bitcoin | ||
|
||
bc1q7xaxer2xpxttm3vpzc8s9dutvck8u9ercxxc95 | ||
|
||
### Ethereum | ||
|
||
0xB7351e098c80E2dCDE48BB769ac14c599E32c47E | ||
|
||
### Monero | ||
|
||
44Y47Sf2huJV4hx7K1JrTeKbgkPsWdRWSbEiAHRWKroaGYAnxkPjdxhUsDeiFeQ3wc6Tw8v3uYTZMbBUfcdUUgqt5HCqbtY | ||
|
||
### Litecoin | ||
|
||
LQzd9phuN7iPRn8p5rT1zyVssJ8nY5WjM5 | ||
|
||
## Roadmap | ||
|
||
- [x] Python library | ||
|
||
- [ ] Mass generation | ||
|
||
- [ ] GUI |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from setuptools import setup, find_packages | ||
import codecs | ||
import os | ||
|
||
here = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh: | ||
long_description = "\n" + fh.read() | ||
|
||
VERSION = '{{VERSION_PLACEHOLDER}}' | ||
DESCRIPTION = 'Python package for generating training data from documents.' | ||
|
||
# Setting up | ||
setup( | ||
name="vidstream", | ||
version=VERSION, | ||
author="LIZARD-OFFICIAL-77", | ||
author_email="<lizard.official.77@gmail.com>", | ||
description=DESCRIPTION, | ||
long_description_content_type="text/markdown", | ||
long_description=long_description, | ||
packages=find_packages(), | ||
install_requires=( | ||
"g4f", | ||
"pdfminer.six", | ||
"python-dotenv" | ||
), | ||
keywords=['python', 'json', 'stream', 'video stream', 'camera stream', 'sockets'], | ||
classifiers=[ | ||
"Development Status :: 4 - Beta", | ||
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)", | ||
"Programming Language :: Python :: 3", | ||
"Operating System :: POSIX :: Linux", | ||
] | ||
) |
Empty file.