Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -23,7 +23,7 @@ def extract_parameters(image, show_full_metadata=False):
|
|
23 |
try:
|
24 |
# Parse as JSON if possible
|
25 |
prompt_data = json.loads(raw_prompt)
|
26 |
-
# Look for the main prompt text (often in a node like '51'
|
27 |
main_prompt = None
|
28 |
for node_id, node in prompt_data.items():
|
29 |
if "inputs" in node and "text" in node["inputs"]:
|
@@ -70,7 +70,7 @@ interface = gr.Interface(
|
|
70 |
fn=extract_parameters,
|
71 |
inputs=[
|
72 |
gr.Image(type="filepath", label="Upload a ComfyUI Image"),
|
73 |
-
gr.Checkbox(label="Show Full Metadata",
|
74 |
],
|
75 |
outputs=gr.Textbox(label="Extracted Parameters", lines=10),
|
76 |
title="ComfyUI Image to Parameters",
|
|
|
23 |
try:
|
24 |
# Parse as JSON if possible
|
25 |
prompt_data = json.loads(raw_prompt)
|
26 |
+
# Look for the main prompt text (often in a node like '51')
|
27 |
main_prompt = None
|
28 |
for node_id, node in prompt_data.items():
|
29 |
if "inputs" in node and "text" in node["inputs"]:
|
|
|
70 |
fn=extract_parameters,
|
71 |
inputs=[
|
72 |
gr.Image(type="filepath", label="Upload a ComfyUI Image"),
|
73 |
+
gr.Checkbox(label="Show Full Metadata", value=False) # Changed 'default' to 'value'
|
74 |
],
|
75 |
outputs=gr.Textbox(label="Extracted Parameters", lines=10),
|
76 |
title="ComfyUI Image to Parameters",
|