Spaces:
Running
on
Zero
Running
on
Zero
| import gradio as gr | |
| import os | |
| import torch | |
| import torchvision | |
| from PIL import Image | |
| import numpy as np | |
| import imageio | |
| import spaces | |
| extensions_dir = "./torch_extension/" | |
| os.environ["TORCH_EXTENSIONS_DIR"] = extensions_dir | |
| from networks.generator import Generator | |
| def generator(prompt): | |
| return prompt | |
| gr.Interface( | |
| fn=generate, | |
| inputs=gr.Text(), | |
| outputs=gr.Text(), | |
| ).launch() |