Add Ollama news sentiment analysis

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-02-02 10:56:45 +00:00
parent 973917dad2
commit bbd902c6fa
41 changed files with 527 additions and 308 deletions

View File

@@ -47,10 +47,25 @@ CREATE TABLE IF NOT EXISTS qrust.news (
symbols Array(LowCardinality(String)),
headline String,
author String,
source String,
summary String,
content String,
url String,
sentiment Enum(
'very_negative' = -3,
'negative' = -2,
'mildly_negative' = -1,
'neutral' = 0,
'mildly_positive' = 1,
'positive' = 2,
'very_positive' = 3
),
confidence Enum(
'very_uncertain' = -3,
'uncertain' = -2,
'mildly_uncertain' = -1,
'neutral' = 0,
'mildly_certain' = 1,
'certain' = 2,
'very_certain' = 3
),
INDEX index_symbols symbols TYPE bloom_filter()
)
ENGINE = ReplacingMergeTree()

View File

@@ -0,0 +1,20 @@
services:
ollama:
image: ollama/ollama
hostname: ollama
restart: unless-stopped
volumes:
- ollama:/root/.ollama
ports:
- target: 11434
published: 11434
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
volumes:
ollama: