0xMaka/trading-candles-subset-sc-format
Viewer • Updated • 223k • 80 • 2
How to use Isotonic/deberta-v3-base-market with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Isotonic/deberta-v3-base-market") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Isotonic/deberta-v3-base-market")
model = AutoModelForSequenceClassification.from_pretrained("Isotonic/deberta-v3-base-market", device_map="auto")deberta-v3-base-market is a text classification bot for binary classification of a trading candles opening and closing prices.
This model can reliably return the bullish or bearish status of a candle given the opening, closing, high and low, in a format shown. It will have trouble if the order of the numbers change (even if tags are included).
You can use this model directly with a pipeline
>>> from transformers import pipeline
>>> pipe = pipeline("text-classification", model="Isotonic/deberta-v3-base-market", num_labels=2, use_fast=False)
>>> text = "identify candle: open: 21788.19, close: 21900, high: 21965.23, low: 21788.19"
>>> pipe(text)
[{'label': 'Bullish', 'score': 0.9999979734420776}]