Skip to content

Instantly share code, notes, and snippets.

woctezuma /
Created Dec 29, 2021 — forked from ToutinRoger/sample.mjs
Sample request for a GraphQL Query
# Import the requests module as it allows
# us to request to the api.
import requests
# NOTE: This is for requesting a GraphQL response
# without any authorization (bearer token | access_token)
# The GraphQL url to request which can be:
# - [Main Site]
# - [Counter Part Of Main Site]
# 1. Set up StyleGAN
import dnnlib
import dnnlib.tflib as tflib
import pretrained_networks
network_pkl = 'gdrive:networks/stylegan2-ffhq-config-f.pkl'
_G, _D, Gs = pretrained_networks.load_networks(network_pkl)
Gs_kwargs = dnnlib.EasyDict()