Spaces:
Running
Running
Commit
·
e429a4e
1
Parent(s):
25a1951
Use textbox outputs to avoid Gradio schema error on Spaces
Browse files
app.py
CHANGED
|
@@ -65,7 +65,7 @@ def make_interface():
|
|
| 65 |
def _on_files_change(files):
|
| 66 |
"""Update preview and clear outputs when files are removed."""
|
| 67 |
if not files:
|
| 68 |
-
return [],
|
| 69 |
return files, gr.update(), gr.update()
|
| 70 |
|
| 71 |
with gr.Blocks(title="Garment Micro-Trend Detector") as demo:
|
|
@@ -101,7 +101,7 @@ def make_interface():
|
|
| 101 |
object_fit="contain", # preserve aspect ratio
|
| 102 |
height="auto",
|
| 103 |
)
|
| 104 |
-
json_out = gr.
|
| 105 |
summary_md = gr.Markdown(label="Summary")
|
| 106 |
|
| 107 |
image_input.change(_on_files_change, inputs=image_input, outputs=[preview, json_out, summary_md], queue=False)
|
|
|
|
| 65 |
def _on_files_change(files):
|
| 66 |
"""Update preview and clear outputs when files are removed."""
|
| 67 |
if not files:
|
| 68 |
+
return [], "", ""
|
| 69 |
return files, gr.update(), gr.update()
|
| 70 |
|
| 71 |
with gr.Blocks(title="Garment Micro-Trend Detector") as demo:
|
|
|
|
| 101 |
object_fit="contain", # preserve aspect ratio
|
| 102 |
height="auto",
|
| 103 |
)
|
| 104 |
+
json_out = gr.Textbox(label="Micro-trend JSON", lines=20, interactive=False)
|
| 105 |
summary_md = gr.Markdown(label="Summary")
|
| 106 |
|
| 107 |
image_input.change(_on_files_change, inputs=image_input, outputs=[preview, json_out, summary_md], queue=False)
|