diff --git a/.gitignore b/.gitignore index a0bab4c..17573f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ build/ selfcheckgpt.egg-info examples/ +dist/ diff --git a/DESCRIPTION.txt b/DESCRIPTION.txt index de97775..50c83de 100644 --- a/DESCRIPTION.txt +++ b/DESCRIPTION.txt @@ -1,36 +1,37 @@ SelfCheckGPT ===================================================== -- Code for our paper "[SelfCheckGPT: Zero-Resource Black-Box Hallucination Detection for Generative Large Language Models](https://arxiv.org/abs/2303.08896)" -- More information can be found on our [project page](https://github.com/potsawee/selfcheckgpt) +- Code for our paper "SelfCheckGPT: Zero-Resource Black-Box Hallucination Detection for Generative Large Language Models", https://arxiv.org/abs/2303.08896 +- More information can be found on our project page: https://github.com/potsawee/selfcheckgpt Installation ----------------------------------------------------- +:: + pip install selfcheckgpt Example ----------------------------------------------------- -```python -from selfcheckgpt.modeling_mqag import SelfCheckMQAG -from selfcheckgpt.modeling_bertscore import SelfCheckBERTScore - -selfcheck_mqag = SelfCheckMQAG() -selfcheck_bertscore = SelfCheckBERTScore() - -sent_scores_mqag = selfcheck_mqag.predict( - sentences, - passage, - [sample1, sample2, sample3], - num_questions_per_sent = 5, - scoring_method = 'bayes_with_alpha', - beta1 = 0.8, beta2 = 0.8, -) -sent_scores_bertscore = selfcheck_bertscore.predict( - sentences, - [sample1, sample2, sample3], -) - -``` +.. code:: python + + from selfcheckgpt.modeling_mqag import SelfCheckMQAG + from selfcheckgpt.modeling_bertscore import SelfCheckBERTScore + + selfcheck_mqag = SelfCheckMQAG() + selfcheck_bertscore = SelfCheckBERTScore() + + sent_scores_mqag = selfcheck_mqag.predict( + sentences, + passage, + [sample1, sample2, sample3], + num_questions_per_sent = 5, + scoring_method = 'bayes_with_alpha', + beta1 = 0.8, beta2 = 0.8, + ) + sent_scores_bertscore = selfcheck_bertscore.predict( + sentences, + [sample1, sample2, sample3], + ) diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..1481cb8 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +include DESCRIPTION.txt +include LICENSE diff --git a/setup.py b/setup.py index d36343c..3ba1eba 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ # calling the setup function setup( name='selfcheckgpt', - version='0.1.0', + version='0.1.1', description='SelfCheckGPT - Assessing text-based responses from LLMs', long_description=long_description, url='https://github.com/potsawee/selfcheckgpt', @@ -34,5 +34,6 @@ packages=['selfcheckgpt'], classifiers=CLASSIFIERS, install_requires=REQUIREMENTS, - keywords='selfcheckgpt' + keywords='selfcheckgpt', + include_package_data=True, )