bryanzhou008's picture
Upload 5 files
a103d54 verified
raw
history blame
526 Bytes
import gradio as gr
from src.v2_for_hf import generate_images
from src.v2_for_hf import NUM_GEN
iface = gr.Interface(
fn=generate_images,
inputs=[
gr.Textbox(label="OpenAI API Key"),
gr.Image(label="Input Image", type="filepath"),
gr.Textbox(label="Mistaken Class"),
gr.Textbox(label="Ground Truth Class")
],
outputs=[
gr.Image(label="Output Image") for i in range(NUM_GEN)
],
title="visual-data-aug",
)
if __name__ == "__main__":
iface.launch(share=True)