Generative Pretrained Model

NLP
text
GPT
generation
deep learning
Author

Modelex

Published

October 12, 2023

MODELEX-GPT-v0.1

API Request

Token: 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

import requests

API_URL = "https://api-inference.huggingface.co/models/mistralai/Mistral-7B-v0.1"
headers = {"Authorization": "Bearer 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"}

def query(payload):
    response = requests.post(API_URL, headers=headers, json=payload)
    return response.json()

Prompt:

Can you please let us know more details about your
output = query({
    "inputs": "Can you please let us know more details about your ",
})
output
[{'generated_text': 'Can you please let us know more details about your 2018-2019 season?\n\nWe are a small, but very'}]
Canasa is the
output = query({
    "inputs": "Canada is the",
})
output
[{'generated_text': 'Canada is the second largest country in the world, and it is also one of the most beautiful. It is a'}]
output = query({
    "inputs": "Rich Dad Poor Dad is a 1997 book written by",
})
output
[{'generated_text': 'Rich Dad Poor Dad is a 1997 book written by Robert Kiyosaki and Sharon Lechter. It has been on the New York Times Best'}]