Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -18,9 +18,22 @@ sepia_interface = gr.Interface(sepia, gr.Image(), "image")
|
|
| 18 |
|
| 19 |
## https://www.gradio.app/docs/gradio/blocks
|
| 20 |
## required positional arguments: 'inputs' and 'outputs'
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
#with gr.Blocks() as generated_output:
|
| 26 |
# inp = gr.Interface(sepia, gr.Image(), "image")
|
|
|
|
| 18 |
|
| 19 |
## https://www.gradio.app/docs/gradio/blocks
|
| 20 |
## required positional arguments: 'inputs' and 'outputs'
|
| 21 |
+
def process_image(image):
|
| 22 |
+
# Your image processing logic here
|
| 23 |
+
return "Processed Text"
|
| 24 |
+
|
| 25 |
+
def additional_input(text):
|
| 26 |
+
return f"Additional input received: {text}"
|
| 27 |
+
|
| 28 |
+
with gr.Blocks() as generated_output:
|
| 29 |
+
with gr.Row():
|
| 30 |
+
with gr.Column():
|
| 31 |
+
input_img = gr.Image(label="Input Image")
|
| 32 |
+
clear_button = gr.Button("Clear")
|
| 33 |
+
submit_button = gr.Button("Submit")
|
| 34 |
+
with gr.Column():
|
| 35 |
+
output_text = gr.Textbox(label="Output Text")
|
| 36 |
+
additional_text = gr.Textbox(label="Additional Input")
|
| 37 |
|
| 38 |
#with gr.Blocks() as generated_output:
|
| 39 |
# inp = gr.Interface(sepia, gr.Image(), "image")
|