Spaces:
Runtime error
Runtime error
File size: 788 Bytes
9b86185 931341e 9b86185 931341e 9b86185 0192256 9b86185 ba1d8b6 9b86185 0192256 9b86185 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
import gradio as gr
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import torch.optim as optim
import kornia.augmentation as K
from CLIP import clip
from torchvision import transforms
from PIL import Image
import numpy as np
import math
from matplotlib import pyplot as plt
from fastprogress.fastprogress import master_bar, progress_bar
from IPython.display import HTML
from base64 import b64encode
def generate(text, n_steps):
#todo
return np.random.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="N Steps")
],
outputs=[
gr.outputs.Image(type="numpy", label="Output Image")
],
).launch() |