Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -94,6 +94,8 @@ def process_image(image_src, options=None, processor=None):
|
|
| 94 |
'''
|
| 95 |
return custom_output
|
| 96 |
|
|
|
|
|
|
|
| 97 |
# Create Gradio input and output components
|
| 98 |
image_input = gr.inputs.Image(type='filepath', label="Input Image")
|
| 99 |
semantic_segment_checkbox = gr.inputs.Checkbox(label="Semantic Segment", default=False)
|
|
@@ -116,7 +118,7 @@ examples = [
|
|
| 116 |
|
| 117 |
# Create Gradio interface
|
| 118 |
interface = gr.Interface(
|
| 119 |
-
fn=lambda image, options: process_image(image, options,
|
| 120 |
inputs=[image_input,
|
| 121 |
gr.CheckboxGroup(
|
| 122 |
label="Options",
|
|
|
|
| 94 |
'''
|
| 95 |
return custom_output
|
| 96 |
|
| 97 |
+
processor = ImageTextTransformation(args)
|
| 98 |
+
|
| 99 |
# Create Gradio input and output components
|
| 100 |
image_input = gr.inputs.Image(type='filepath', label="Input Image")
|
| 101 |
semantic_segment_checkbox = gr.inputs.Checkbox(label="Semantic Segment", default=False)
|
|
|
|
| 118 |
|
| 119 |
# Create Gradio interface
|
| 120 |
interface = gr.Interface(
|
| 121 |
+
fn=lambda image, options: process_image(image, options, processor),
|
| 122 |
inputs=[image_input,
|
| 123 |
gr.CheckboxGroup(
|
| 124 |
label="Options",
|