Instructions to use TextCortex/product_description_generator with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TextCortex/product_description_generator with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TextCortex/product_description_generator")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TextCortex/product_description_generator") model = AutoModelForCausalLM.from_pretrained("TextCortex/product_description_generator", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TextCortex/product_description_generator with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TextCortex/product_description_generator" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TextCortex/product_description_generator", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TextCortex/product_description_generator
- SGLang
How to use TextCortex/product_description_generator with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "TextCortex/product_description_generator" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TextCortex/product_description_generator", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "TextCortex/product_description_generator" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TextCortex/product_description_generator", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TextCortex/product_description_generator with Docker Model Runner:
docker model run hf.co/TextCortex/product_description_generator
Commit ·
db26375
1
Parent(s): 1c0ffdb
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
---
|
| 4 |
+
|
| 5 |
+
## TextCortex AI - Product Description Generator - Electronics Model
|
| 6 |
+
|
| 7 |
+
This is one of our legacy models that was used for generating product descriptions for Electronic products. Because of the inference times, we trained this model on a very small version of the GPT-NEO with 125M parameters.
|
| 8 |
+
|
| 9 |
+
Due to its small size, we had to train a model for each product category for our users.\
|
| 10 |
+
We will be releasing other trained models on other categories soon.
|
| 11 |
+
|
| 12 |
+
### How to Prompt:
|
| 13 |
+
|
| 14 |
+
Just give your product name and add 'Product Description:' at the end of it to generate product descriptions.\
|
| 15 |
+
Here is an example prompt:\
|
| 16 |
+
`Product name: USB Dongle for video capture Product Description:`
|
| 17 |
+
|
| 18 |
+
### TextCortex API
|
| 19 |
+
|
| 20 |
+
If you want to generate product descriptions programatically, you can check out our API, hemingwAI at this link: https://textcortex.com/documentation/api
|