Instructions to use DemocracyStudio/generate_nft_content with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DemocracyStudio/generate_nft_content with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DemocracyStudio/generate_nft_content")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DemocracyStudio/generate_nft_content") model = AutoModelForCausalLM.from_pretrained("DemocracyStudio/generate_nft_content") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use DemocracyStudio/generate_nft_content with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DemocracyStudio/generate_nft_content" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DemocracyStudio/generate_nft_content", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/DemocracyStudio/generate_nft_content
- SGLang
How to use DemocracyStudio/generate_nft_content 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 "DemocracyStudio/generate_nft_content" \ --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": "DemocracyStudio/generate_nft_content", "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 "DemocracyStudio/generate_nft_content" \ --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": "DemocracyStudio/generate_nft_content", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use DemocracyStudio/generate_nft_content with Docker Model Runner:
docker model run hf.co/DemocracyStudio/generate_nft_content
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
Controllable text generation for the marketing content of NFTs
This repository contains all the information, code and datasets of the "Controllable text generation for the marketing content of NFTs" transformers' model started as a group project at the Machine Learning degree of opencampus.sh.
You can either clone this repository and run the app.py file locally, or directly use the app in your browser from the dedicated huggingface space. First release is June 15th, 2022, further improvements are expected to come.
Project Description:
While text generation (or natural language generation) refer to computer-generated texts of human-written quality, controllable text generation aims to constrain the generated text by incorporating some pre-specified keywords as manual input.
Since the value of NFTs highly relies on their community engagement, and the capacity to partnering with influencers, marketizing NFTs demands a high production capacity of easily customizable turnkey articles, which gives lots of sense to computer-generated marketing content.
The pitch deck of the project is available here.
Datasets:
Medium.com is undoubtably a major media platform for content marketing. I've been using selenium to collect about 4000 human-written texts answering to the queries #Nft, #Nftart, #Nftartist, #Nft Collectibles, #Nft Marketplace, and #opensea. The resulting cleaned dataset is available in the dataset folder. It has been cleaned of urls, digits, and filtered out negative or neutral sentiments. So as we're sure the model will only generate enthusiastic content about NFTs.
Literature:
2021
- Exploring Transformers in Natural Language Generation: GPT, BERT, and XLNet
- Parallel Refinements for Lexically Constrained Text Generation with BART
- BARTSCORE: Evaluating Generated Text as Text Generation
- Neural Rule-Execution Tracking Machine For Transformer-Based Text Generation
2020
- The survey: Text generation models in deep learning
- Modern methods for text generation
- PAIR: Planning and Iterative Refinement in Pre-trained Transformers for Long Text Generation
A video recording of the literature review is available here.
- Downloads last month
- 7