This release is a pre-release and may not be stable for production use.
QA Genie
English | हिंदी
QA Genie is a Python package designed for generating questions and answers from unstructured data.
This package is built using the unofficial API of HuggingChat: hugchat. It leverages HuggingChat's capabilities for question and answer generation.
Note
This package is in its alpha release and more functionality will be added soon!
Update 1.0.0a3: This update enables the user to adjust iteration time. (Solves #1) Update 1.0.0a4: Enables user to get raw text output from chatbot for manual cleaning. Also fixes bugs in cleaning.
Installation
pip install qa_genie
or
pip3 install qa_genie
Usage
email = "your_email@example.com" # huggingface account email
password = "your_password" # huggingface account password
model = "meta" # use "meta" to use meta-llama/Llama-2-70b-chat-hf or "oasst" to use OpenAssistant/oasst-sft-6-llama-30b
# Initialize chatbot
chatbot = get_generator(email, password, model)
# Example usage with a single text
text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
result_single = extract_qa(chatbot, text, num_qn=3) # returns pandas.DataFrame with num_qn questions and answers
# Example usage with multiple texts
texts = ["Text 1", "Text 2", "Text 3"]
result_multiple = extract_qas(chatbot, texts, num_qn_each=3) # return pandas.DataFrame with num_qn_each questions and answers generated for each text
Important Note
As mentioned by Soulter, Server resources are precious, it is not recommended to request this API in a high frequency.
Contributing
Feel free to contribute to QA Genie by creating issues, submitting pull requests, or suggesting improvements. Your contributions are highly appreciated :)
Metadata
Release files for qa-genie 1.0.0a4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qa_genie-1.0.0a4.tar.gz | 6.3 kB | Without provenance | Details for qa_genie-1.0.0a4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qa_genie-1.0.0a4-py3-none-any.whl | Python 3 | none | any | Details for qa_genie-1.0.0a4-py3-none-any.whl |
Total release size: 11.0 kB
Release files / qa_genie-1.0.0a4.tar.gz
| Download URL | qa_genie-1.0.0a4.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c65b77369d46363b2aed3135aa02dafa357e25bce0e3201ee7bd37c5b0fa3968
|
|
BLAKE2b-256 checksum How to use checksums |
42b5f50a8810f0be98510f053d0601d61668025ecced9ef6f668f46f188e6eca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.9
|
Release files / qa_genie-1.0.0a4-py3-none-any.whl
| Download URL | qa_genie-1.0.0a4-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
11f2138fa1bf80605ae11a13b64d0a8d0385e95a7ea8d39e6cd56c8539507fc1
|
|
BLAKE2b-256 checksum How to use checksums |
485c9f120a65d0a93131a3e28c23d81ae793fdfe263873de60a31b9e7f83ed79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.9
|
Security for qa-genie 1.0.0a4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.