Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 48 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,56 @@
# TextCortex - HemingwAI
![alt text](https://github.com/textcortex/hemingwai/raw/main/textcortex_logo.png?raw=true "TextCortex AI API Hemingway Logo")
# TextCortex Python Library

Generate product descriptions, blogs, ads and more using GPT architecture with a single request to TextCortex API a.k.a
HemingwAI
![alt text](https://github.com/textcortex/textcortex-python/raw/main/textcortex_logo.png?raw=true "TextCortex AI API Hemingway Logo")

Python Library for high level access to the TextCortex API. Generate product descriptions, blogs, ads and more using GPT architecture with a single request.

## Installation

Install the package using pip:

```sh
pip install textcortex
```

## Usage

## How To Generate Content using TextCortex Hemingwai:
1. Signup at https://textcortex.com
2. Sign-in and click on account on top right.
3. Go to API Key section and copy your key.
4. Install textcortex package:
`pip install textcortex`
5. Enter your API Key to hemingwai
6. Generate copy text with a single line of code!
1. Sign-in and click on account on top right.
1. Go to API Key section and copy your key.
1. Set your API Key.

### Here is an example request to Hemingwai for generating Product Descriptions:

### Example usage

Make sure you have a TextCortex account. If you don't have one, [click here](https://app.textcortex.com/user/signup) to sign up (it just takes a few seconds).

Once you are signed in, you can head off to Account > API Key section. [Click here](https://app.textcortex.com/user/dashboard/settings/api-key) to visit that page.

Copy and paste your API key to the example below. It should return product descriptions based on the given parameters:

```python
from textcortex import TextCortex

# Create the hemingwai object and enter your API Key
hemingwai = TextCortex(api_key='YOUR_API_KEY')

# Generate Product Descriptions using Hemingwai
product_description = hemingwai.generate_product_descriptions(
product_name='Black Leather Backpack Bag', product_category='Shoes & Bags, Women',
brand='Cortexian', product_features='Color: Black, Material: Faux Leather',
source_language='en', word_count=100, temperature=0.7, n_gen=4)
API_KEY = 'YOUR_API_KEY' # <---- Paste your API key here

# Create the TextCortex API object and enter your API Key
tc = TextCortex(api_key=API_KEY)

# Generate product descriptions
product_description = tc.generate_product_descriptions(
product_name='Black Leather Backpack Bag',
product_category='Shoes & Bags, Women',
brand='Cortexian',
product_features='Color: Black, Material: Faux Leather',
source_language='en',
token_count=100,
temperature=0.7,
n_gen=4,
)
```

#### Response:

```json
[
{
Expand All @@ -46,30 +68,12 @@ product_description = hemingwai.generate_product_descriptions(
]
```

### What kind of texts are possible to generate?

Currently we support the following methods for generating copy text like the following:
```python
# Generate Blog Articles:
hemingwai.generate_blog

# Generate Blog Titles:
hemingwai.generate_blog_titles

# Autocomplete the rest using Hemingwai
hemingwai.generate
## Documentation

# Extend paragraphs with a blog writing tone using Hemingwai
hemingwai.extend
Browse the [documentation on TextCortex](https://textcortex.com/documentation/api).

# Generate Product Descriptions using Hemingwai
hemingwai.generate_product_descriptions
<!-- ### Text Generation Variables

# Paraphrase a given sentence with a tone change or without.
hemingwai.paraphrase
```

### Text Generation Variables
There are some variables that you need to send before making a request to Hemingwai.

Here is a brief summary of what those variables:
Expand All @@ -85,15 +89,8 @@ We support 72 languages. If you don't know the language code you can also use 'a

Examples: For example while generating ads, you can add your target segment as an option.
See examples.py for examples.
```

#### Still have questions?
You can have a look at the [HemingwAI's documentation on TextCortex website](https://textcortex.com/documentation/api)

[Or talk to us at the TextCortex Dev Community on slack](https://join.slack.com/t/textcortexaicommunity/shared_invite/zt-rmaw7j10-Lz9vf86aF5I_fYZAS7JafQ)
``` -->

#### Maintainer/Creator
TextCortex Team (https://textcortex.com)
## Getting help

#### License
MIT
To get help with using TextCortex Python library, join our [Discord](https://discord.textcortex.com/).
67 changes: 37 additions & 30 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,40 +1,47 @@
from setuptools import setup, find_packages

DESCRIPTION = 'Generate product descriptions, blogs, emails, ads and more using GPT architecture with a single ' \
'request to TextCortex API a.k.a Hemingwai'
DESCRIPTION = "Python library for high-level access to the TextCortex API"

# read the contents of your README file
from os import path

this_directory = path.abspath(path.dirname(__file__))
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
with open(path.join(this_directory, "README.md"), encoding="utf-8") as f:
long_description = f.read()

setup(
name='textcortex',
version='1.0.10',
author='TextCortex AI',
author_email='dev@textcortex.com',
packages=find_packages(),
url='https://github.com/textcortex/hemingwai',
license='MIT',
description=DESCRIPTION,
long_description=long_description,
long_description_content_type='text/markdown',
keywords=['TextCortex AI', 'gpt-2', 'gpt-3', 'gptNEO', 'generate text',
'natural language generation', 'NLP', 'hemingwai', 'transformer', 'generate copy text using AI'],
install_requires=[
"requests"
],
classifiers= [
"Development Status :: 3 - Alpha",
"Intended Audience :: Customer Service",
"Intended Audience :: Information Technology",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Natural Language :: English",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3"
]
name="textcortex",
version="1.0.10",
author="TextCortex AI",
author_email="dev@textcortex.com",
packages=find_packages(),
url="https://github.com/textcortex/textcortex-python",
license="MIT",
description=DESCRIPTION,
long_description=long_description,
long_description_content_type="text/markdown",
keywords=[
"TextCortex AI",
"gpt-2",
"gpt-3",
"gptNEO",
"generate text",
"natural language generation",
"NLP",
"transformer",
"generate copy text using AI",
],
install_requires=["requests"],
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Customer Service",
"Intended Audience :: Information Technology",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Natural Language :: English",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 3",
"Operating System :: MacOS :: MacOS X",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3",
],
)
Loading