File size: 346 Bytes
9b86185
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import gradio as gr
import numpy as np

def generate(text):
  #todo
  return np.random(128, 128, 3).astype(np.uint8)

iface = gr.Interface(fn=generate, 
  inputs=[
    gr.inputs.Textbox(label="Text Input"),
    gr.inputs.Number(default=42, label="seed")
  ], 
  outputs=[
    gr.outputs.Image(type="numpy", label="Output Image")
  ],
  ).launch()