semvec/pypi-packages huggingface dataset:
porter-schmorter 0.16.8
porter is a framework for exposing machine learning models via REST APIs.
Requires Python: >=3.9

# porter

| | |
| --- | --- |
| Testing | ![Unit Tests](https://github.com/dantegates/porter/actions/workflows/unit-tests.yml/badge.svg) |
| Documentation |  [![Documentation Status](https://readthedocs.org/projects/porter/badge/?version=latest)](https://porter.readthedocs.io/en/latest/?badge=latest) |
| Meta | [![License](https://img.shields.io/pypi/l/porter-schmorter)](./LICENSE) [![PyPI](https://img.shields.io/pypi/v/porter-schmorter)](https://pypi.org/project/porter-schmorter/) [![Python](https://img.shields.io/pypi/pyversions/porter-schmorter.svg)](https://pypi.org/project/porter-schmorter/) |




`porter` is a framework for data scientists who want to quickly and reliably deploy machine learning models as REST APIs. 

Simplicity is a core goal of this project. The following 6 lines of code are a fully functional example. While this should the most common use case, `porter` is also designed to be easily extended to cover the remaining cases not supported out of the box.

```python
from porter.datascience import WrappedModel
from porter.services import ModelApp, PredictionService

my_model = WrappedModel.from_file('my-model.pkl')
prediction_service = PredictionService(model=my_model, name='my-model', api_version='v1')

app = ModelApp([prediction_service])
app.run()
```

Features include:

* **Practical design**: suitable for projects ranging from proof-of-concept to production grade software.
* **Framework-agnostic design**: any object with a `predict()` method will do, which means `porter` plays nicely with [sklearn](https://scikit-learn.org/stable/), [keras](https://keras.io/backend/), or [xgboost](https://xgboost.readthedocs.io/en/latest/) models. Models that don't fit this pattern can be easily wrapped and used in ``porter``.
* **OpenAPI integration**: lightweight, Pythonic schema specifications support automatic validation of HTTP request data and generation of API documentation using Swagger.
* **Boiler plate reduction**: `porter` takes care of API logging and error handling out of the box, and supports streamlined model loading from `.pkl` and `.h5` files stored locally or on AWS S3.
* **Robust testing**: a comprehensive test suite ensures that you can use `porter` with confidence. Additionally, `porter` has been extensively field tested.

# Installation

`porter` can be installed with `pip` for `python3.9` and higher as follows:

```
pip install porter-schmorter  # because porter was taken
```

For more details, see [this page](https://porter.readthedocs.io/en/latest/installation.html).

# Documentation
For more information, see the [documentation](https://porter.readthedocs.org).
WPSProtocol 1.0.post4
A package for Implementing Walsh Pulse Sequenece constructed out of XY Hamiltonian based on Votto, M., Zeiher, J., & Vermersch, B. (2023). Robust universal quantum processors in spin systems via Walsh pulse sequences. arXiv preprint arXiv:2311.10600.
Requires Python: ==3.8.19


# WPSProtocol

This is developed as part of my summer internship at LPMMC, UGA-CNRS, Grenoble, France. 

WPSProtocol makes use of Walsh Functions to generate Pulse Sequences for selective interactions among qubits based on the underlying XY Hamiltonian.

WPSProtocol contains codes for implementing the protocol described in this paper Votto, M., Zeiher, J., & Vermersch, B. (2023). Robust universal quantum processors in spin systems via Walsh pulse sequences. arXiv preprint arXiv:2311.10600.

## Installation

Create a virtual environment

```bash
conda create -n <virtual_env name>
```

Installing the package
```bash
python -m pip install WPSProtocol
```

## Run Locally

Make sure to create a virtual environment. To create a conda environment, using the following command.
```bash
  conda create -n <virtual_env name>
``` 
Clone the project
- Using https

```bash
  git clone https://github.com/JessicaJohnBritto/WalshPulseSeq.git
```
- Using ssh
```bash
  git clone git@github.com:JessicaJohnBritto/WalshPulseSeq.git
```

To use it in development mode.

Note: Be inside the directory where pyproject.toml is before running the following command. For eg - here WalshPulseSeq is the directory, therefore, the path variable should be ../WalshPulseSeq.
```bash
  python -m pip install -e .
```

To install the package using git, use the following commands.

```bash
  python -m pip install git+https://github.com/JessicaJohnBritto/WalshPulseSeq.git#egg=WPSProtocol

```
claim-identification-prompt-tuning 0.1.1
Identifies Claims from Text
Requires Python: >=3.6


---
# Prompt Tuning for Claim Summarization

This Python package provides a tool to generate short summaries for content based on a set of zero-shot examples. The approach leverages prompt tuning to generate summaries of claims from input content using pre-existing models like  Gemini, without needing a fine-tuning phase.

## Approach

We utilize **prompt tuning** as the primary method for this project. Instead of fine-tuning the language model (which requires large datasets), we provide **prompts** by showing the model several examples of "Content" followed by the expected "Summary of Claims". This method is particularly useful when working with small datasets.

1. **Data**: The input data consists of "Content" (such as a conversation between a user and an agent) and "Reasons" (which are comma-separated summaries of the issues or claims).
   
2. **Zero-shot learning**: For each query, we randomly select a subset of examples (e.g., 7) from the dataset to use as reference examples. The prompt generator constructs a natural language prompt from these examples, asking the model to summarize the new content.

3. **Evaluation**: We evaluate the model's performance using:
   - **ROUGE Scores**: Measures the overlap between the generated summary and the actual summary (Reason).
   - **Cosine Similarity**: Measures the similarity between the TF-IDF vectors of the generated summary and the actual reason.

## How to Use

### Installation

1. Clone the repository or download the `.zip` file.
2. Ensure you have the required dependencies installed. You can install them using the following:
   ```bash
   pip3 install setuptools 
   ```

### Usage

This package exposes two main functions to the user:

#### 1. **Performance Evaluation** (`perfomance_on_data`)

This function evaluates the model's performance across the entire dataset by generating summaries and calculating ROUGE and Cosine Similarity metrics.

```python
from your_package_name import perfomance_on_data

# Evaluate the performance on the dataset
perfomance_on_data()
```

**Output**: 
- The function will print out the generated summaries, the actual summaries, ROUGE scores, and Cosine Similarity scores for each example.
- It will also print the average ROUGE and Cosine Similarity scores across all examples.

#### 2. **Generate Summary on Query** (`genrate_on_query`)

This function allows the user to input a query (i.e., new content) and receive a generated summary of claims based on the trained model.

```python
from your_package_name import genrate_on_query

# Generate summary for a user-provided query
genrate_on_query()
```



---

## Dependencies

- `transformers`: For utilizing pre-trained language models.
- `sklearn`: For cosine similarity and vectorization.
- `rouge`: For calculating ROUGE scores.


---

This package offers a lightweight and flexible way to generate summaries using zero-shot learning and can be integrated into any workflow requiring natural language summarization.
claim-identification 0.1.0
Identifies Claims from Text
Requires Python: >=3.6


---
# Prompt Tuning for Claim Summarization

This Python package provides a tool to generate short summaries for content based on a set of zero-shot examples. The approach leverages prompt tuning to generate summaries of claims from input content using pre-existing models like  Gemini, without needing a fine-tuning phase.

## Approach

We utilize **prompt tuning** as the primary method for this project. Instead of fine-tuning the language model (which requires large datasets), we provide **prompts** by showing the model several examples of "Content" followed by the expected "Summary of Claims". This method is particularly useful when working with small datasets.

1. **Data**: The input data consists of "Content" (such as a conversation between a user and an agent) and "Reasons" (which are comma-separated summaries of the issues or claims).
   
2. **Zero-shot learning**: For each query, we randomly select a subset of examples (e.g., 7) from the dataset to use as reference examples. The prompt generator constructs a natural language prompt from these examples, asking the model to summarize the new content.

3. **Evaluation**: We evaluate the model's performance using:
   - **ROUGE Scores**: Measures the overlap between the generated summary and the actual summary (Reason).
   - **Cosine Similarity**: Measures the similarity between the TF-IDF vectors of the generated summary and the actual reason.

## How to Use

### Installation

1. Clone the repository or download the `.zip` file.
2. Ensure you have the required dependencies installed. You can install them using the following:
   ```bash
   pip3 install setuptools 
   ```

### Usage

This package exposes two main functions to the user:

#### 1. **Performance Evaluation** (`perfomance_on_data`)

This function evaluates the model's performance across the entire dataset by generating summaries and calculating ROUGE and Cosine Similarity metrics.

```python
from your_package_name import perfomance_on_data

# Evaluate the performance on the dataset
perfomance_on_data()
```

**Output**: 
- The function will print out the generated summaries, the actual summaries, ROUGE scores, and Cosine Similarity scores for each example.
- It will also print the average ROUGE and Cosine Similarity scores across all examples.

#### 2. **Generate Summary on Query** (`genrate_on_query`)

This function allows the user to input a query (i.e., new content) and receive a generated summary of claims based on the trained model.

```python
from your_package_name import genrate_on_query

# Generate summary for a user-provided query
genrate_on_query()
```



---

## Dependencies

- `transformers`: For utilizing pre-trained language models.
- `sklearn`: For cosine similarity and vectorization.
- `rouge`: For calculating ROUGE scores.


---

This package offers a lightweight and flexible way to generate summaries using zero-shot learning and can be integrated into any workflow requiring natural language summarization.