1234567891011121314151617181920212223242526 |
- """
- This examples demonstrates the setup for Question-Answer-Retrieval.
- You can input a query or a question. The script then uses semantic search
- to find relevant passages in Simple English Wikipedia (as it is smaller and fits better in RAM).
- As model, we use: nq-distilbert-base-v1
- It was trained on the Natural Questions dataset, a dataset with real questions from Google Search
- together with annotated data from Wikipedia providing the answer. For the passages, we encode the
- Wikipedia article tile together with the individual text passages.
- Google Colab Example: https://colab.research.google.com/drive/11GunvCqJuebfeTlgbJWkIMT0xJH6PWF1?usp=sharing
- """
- import json
- import time
- import gzip
- import os
- base_directory = os.path.dirname(os.path.realpath(__file__))
- def predict(query: str):
- pass
- if __name__ == "__main__":
- predict("What is the capital of Germany?")
|