Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
@@ -2,9 +2,22 @@ import gradio as gr
|
|
2 |
from flow import flow
|
3 |
|
4 |
with gr.Blocks() as app:
|
5 |
-
|
6 |
-
|
7 |
-
component.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
|
9 |
if __name__ == "__main__":
|
10 |
app.launch()
|
|
|
2 |
from flow import flow
|
3 |
|
4 |
with gr.Blocks() as app:
|
5 |
+
task_box = gr.Textbox(label="🕺 Groovy Flow", value="flow.task")
|
6 |
+
with gr.Row():
|
7 |
+
for component in flow.inputs:
|
8 |
+
component.render()
|
9 |
+
|
10 |
+
@gr.on(
|
11 |
+
triggers=[app.load] + [input.change for input in flow.inputs],
|
12 |
+
inputs=flow.inputs,
|
13 |
+
outputs=[task_box],
|
14 |
+
trigger_mode="always_last",
|
15 |
+
)
|
16 |
+
def construct_task(*input_values):
|
17 |
+
return flow.task.format(*input_values)
|
18 |
+
|
19 |
+
with gr.Row(scale=5):
|
20 |
+
gr.Image()
|
21 |
|
22 |
if __name__ == "__main__":
|
23 |
app.launch()
|