Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -3,11 +3,6 @@ import gradio as gr
|
|
3 |
from src.v2_for_hf import generate_images
|
4 |
from src.v2_for_hf import NUM_GEN
|
5 |
|
6 |
-
|
7 |
-
def dynamic_label(ground_truth_class):
|
8 |
-
return [gr.Image(label=f"Generated Image of {ground_truth_class}") for _ in range(NUM_GEN)]
|
9 |
-
|
10 |
-
|
11 |
iface = gr.Interface(
|
12 |
fn=generate_images,
|
13 |
inputs=[
|
@@ -16,9 +11,10 @@ iface = gr.Interface(
|
|
16 |
gr.Textbox(label="Mistaken Class"),
|
17 |
gr.Textbox(label="Ground Truth Class")
|
18 |
],
|
19 |
-
outputs=
|
|
|
|
|
20 |
title="visual-data-aug",
|
21 |
-
live=True,
|
22 |
)
|
23 |
|
24 |
if __name__ == "__main__":
|
|
|
3 |
from src.v2_for_hf import generate_images
|
4 |
from src.v2_for_hf import NUM_GEN
|
5 |
|
|
|
|
|
|
|
|
|
|
|
6 |
iface = gr.Interface(
|
7 |
fn=generate_images,
|
8 |
inputs=[
|
|
|
11 |
gr.Textbox(label="Mistaken Class"),
|
12 |
gr.Textbox(label="Ground Truth Class")
|
13 |
],
|
14 |
+
outputs=[
|
15 |
+
gr.Image(label="Generated Image of Ground Truth Class") for i in range(NUM_GEN)
|
16 |
+
],
|
17 |
title="visual-data-aug",
|
|
|
18 |
)
|
19 |
|
20 |
if __name__ == "__main__":
|