Views
No views yet
1id2label = {0: "NEGATIVE", 1: "POSITIVE"}
2label2id = {"NEGATIVE": 0, "POSITIVE": 1}
3
4tokenizer = AutoTokenizer.from_pretrained("femboysLover/gemini_trader_embeddings")
5model = AutoModelForSequenceClassification.from_pretrained(
6 "femboysLover/gemini_trader_embeddings", num_labels=2, id2label=id2label, label2id=label2id
7)
8
9
10text = """
11returns:0.002405
12price_above_moving_fast: true
13recent_news:
14Date: 2023-06-26 14:56:49 Title: Bitcoin markets are staying resilient! Despite low market liquidity and volatility, HODLers continue to accumulate…
15Date: 2023-06-26 16:32:17 Title: Bitcoin Could Soar 10X To Hit $300,000, Reckons XRP Holders’ Lawyer — Here’s How
16Date: 2023-06-27 03:00:59 Title: Jump Trading Accumulating DeFi Tokens, Including LDO, PERP, and MASK
17Date: 2023-06-27 09:30:06 Title: Bitcoin Cash climbs 100% in a week adding over $2 billion to market cap
18(up to 48 news)
19"""
20
21classifier = pipeline("sentiment-analysis", model=model, tokenizer=tokenizer)
22print(classifier(text)) # [{'label': 'POSITIVE', 'score': 0.6116430163383484}] # good entry point for long