Copy import requests API_URL = "https://XXXX" headers = { "Authorization": "Bearer XXX", "Content-Type": "application/json" } def query(payload): response = requests.post(API_URL, headers=headers, json=payload) return response.json() prompt = """### Instruction: Use the input below to create an instruction, which could have been used to generate the input using an LLM. ### Input - Orange juice: liquid - Gatorade: liquid - Eye drops: liquid - Water: liquid - Peanut butter: solid - Iphone: solid - Beer: liquid - Guitar: solid ### Response: """ output = query({ "inputs": prompt }) print(output) # output """ Tell me whether these are liquids or solids: orange juice, gatorade, eye drops, water, peanut butter, iphone, beer, guitar """
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter