-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
import pandas as pd from txtai.pipeline import HFTrainer, Questions, Labels # Training data for few-shot learning data = [ {"question": "What is the url?", "context": "Faiss (https://github.com/facebookresearch/faiss) is a library for efficient similarity search.", "answers": "https://github.com/facebookresearch/faiss"}, {"question": "What is the url", "context": "The last release was Wed Sept 25 2021", "answers": None}, {"question": "What is the date?", "context": "The last release was Wed Sept 25 2021", "answers": "Wed Sept 25 2021"}, {"question": "What is the date?", "context": "The order total comes to $44.33", "answers": None}, {"question": "What is the amount?", "context": "The order total comes to $44.33", "answers": "$44.33"}, {"question": "What is the amount?", "context": "The last release was Wed Sept 25 2021", "answers": None}, ] # Fine-tune QA model trainer = HFTrainer() model, tokenizer = trainer("distilbert-base-cased-distilled-squad", data, task="question-answering")