Skip to content

Instantly share code, notes, and snippets.

@akashyanpure
akashyanpure / API Contract Example Spec.md
Created October 27, 2021 15:17 — forked from BeattieM/API Contract Example Spec.md
An example of an API contract between the server and front-end devices

#Users

  • User object
{
  id: integer
  username: string
  email: string
  created_at: datetime(iso 8601)
  updated_at: datetime(iso 8601)
}
@akashyanpure
akashyanpure / API.md
Created August 12, 2021 11:36 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

from transformers import AutoModelWithLMHead, AutoTokenizer
import torch
tokenizer = AutoTokenizer.from_pretrained("microsoft/DialoGPT-medium")
model = AutoModelWithLMHead.from_pretrained("microsoft/DialoGPT-medium")
sentence_list = [
"I heard you won the cricket match.",