from asyncio import constants import gradio as gr import requests import os import random def desc_to_image(desc): random.seed(desc) #tadneSeed=random.randint(0,2**256) tadneSeed=random.randint(0,2**32) psi=0.7 print("seed",tadneSeed,psi) #iface = gr.Interface.load("spaces/hysts/TADNE") #print("about to die",iface,dir(iface)) #img=iface.fns[0].fn(tadneSeed,psi) print("loading interface") tadne=gr.Interface.load("spaces/hysts/TADNE") print("calling interface") img=tadne(tadneSeed,psi,False) print("got img",img) return img demo = gr.Blocks() with demo: gr.Markdown("

Safety Waifu

") gr.Markdown( "based on TADNE." '

Idea: humans are bad and distinguishing 256 bit hex strings. Humans are good at distinguishing pictures of people.

So, let's convert Ethereum addresses to Anime characters "for security".

This is Uniswap: pic.twitter.com/K2e3MCgXdL

— nagolinc (@nagolinc) February 21, 2021
' ) with gr.Row(): desc_txt = gr.Textbox(label="description",placeholder="0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984") output_image = gr.Image(label="portrait",type="filepath", shape=(256,256)) b0 = gr.Button("Generate Waifu") b0.click(desc_to_image,desc_txt,output_image) #examples=examples demo.launch(enable_queue=True, debug=True)