<jupyter_start><jupyter_text><jupyter_code>!pip install allennlp

from allennlp.predictors.predictor import Predictor

my_passage= "Machine learning (ML) is the scientific study of algorithms and statistical models that computer systems use to perform a specific task without using explicit instructions, relying on patterns and inference instead. It is seen as a subset of artificial intelligence. Machine learning algorithms build a mathematical model based on sample data, known as training data, in order to make predictions or decisions without being explicitly programmed to perform the task. Machine learning algorithms are used in a wide variety of applications, such as email filtering and \
computer vision, where it is difficult or infeasible to develop a conventional algorithm for effectively performing the task."

my_question ="What is seen as a subset of machine learning?"  

def predictor1(my_passage, my_question):
  
  predictor = Predictor.from_path("https://storage.googleapis.com/allennlp-public-models/bidaf-elmo-model-2018.11.30-charpad.tar.gz")
  predictor.predict(
    passage=my_passage,
    question=my_question)

predictor1(my_passage, my_question)
from allennlp.predictors.predictor import Predictor
predictor = Predictor.from_path("https://storage.googleapis.com/allennlp-public-models/bidaf-elmo-model-2018.11.30-charpad.tar.gz")
predictor.predict(
passage='Machine learning (ML) is the scientific study of algorithms and statistical models that computer systems use to perform a specific task without using explicit instructions, relying on patterns and inference instead. It is seen as a subset of artificial intelligence. Machine learning algorithms build a mathematical model based on sample data, known as training data, in order to make predictions or decisions without being explicitly programmed to perform the task. Machine learning algorithms are used in a wide variety of applications, such as email filtering and \
 computer vision, where it is difficult or infeasible to develop a conventional algorithm for effectively performing the task',
question='What is seen as a subset of machine learning?')<jupyter_output>/usr/local/lib/python3.6/dist-packages/torch/nn/modules/rnn.py:51: UserWarning: dropout option adds dropout after all but last recurrent layer, so non-zero dropout expects num_layers greater than 1, but got dropout=0.2 and num_layers=1
  "num_layers={}".format(dropout, num_layers))
/usr/local/lib/python3.6/dist-packages/allennlp/data/token_indexers/token_characters_indexer.py:56: UserWarning: You are using the default value (0) of `min_padding_length`, which can cause some subtle bugs (more info see https://github.com/allenai/allennlp/issues/1954). Strongly recommend to set a value, usually the maximum size of the convolutional layer size when using CnnEncoder.
  UserWarning)
{'fraction_non_alphanumeric': 0.06256590509666081, 'fraction_numerical': 0.012302284710017574, 'mean_word_length': 5.557603686635945, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '470006', 'license': 'Apache-2.0', 'n_tokens_mistral': 750, 'n_tokens_neox': 715, 'n_words': 318, 'path': 'allen_nlp.ipynb', 'repo_name': 'taiwotman/AngularUI-Code', 'size': '2845'}