This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image | |
import stable_inference | |
import numpy as np | |
from einops import repeat | |
''' | |
Interpolate between two images with a prompt of what you expect the midstate to be. | |
Alter the stuff below here to whatever you need it to be. | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# define API options | |
url = "http://hosted.app/api/packets" | |
token = "supersecretusertoken" | |
# create parent function with passed in arguments | |
def customAction(url,token): | |
# uploadPacket function has access to the url & token parameters because they are 'closed' in the nested function | |
def uploadPacket(packet): | |
# upload packet, using passed arguments | |
headers = {'content-type': 'application/json'} |