Spaces:
Runtime error
Runtime error
Update app.py
Browse files7 unmodified lines891011121388 unmodified lines1021031041051061071081091101111121131141151161171181197 unmodified lineshf_token = os.environ.get("HF_TOKEN")from gradio_client import Clientdef safety_check(user_prompt):88 unmodified lines"""with gr.Blocks(css=css) as app:with gr.Column(elem_id="col-container"):gr.HTML(f"""<h2 style="text-align: center;">Consistent Character Workflow</h2><p style="text-align: center;">{description}</p>""")with gr.Row():with gr.Column(scale=2):prompt = gr.Textbox(label="Prompt", info='''Describe the subject. Include clothes and hairstyle for more consistency.''',value="a person, darkblue suit, black tie, white pocket",interactive=False)subject = gr.Image(label="Subject", type="filepath"7 unmodified lines8910111213141588 unmodified lines1041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341357 unmodified lineshf_token = os.environ.get("HF_TOKEN")from gradio_client import Clientis_shared_ui = True if "fffiloni/consistent-character" in os.environ['SPACE_ID'] else Falsedef safety_check(user_prompt):88 unmodified lines"""with gr.Blocks(css=css) as app:with gr.Column(elem_id="col-container"):gr.Markdown("# Consistent Character Workflow")gr.Markdown("### Create images of a given character in different poses • running cog image by fofr")gr.HTML("""<div style="display:flex;column-gap:4px;"><a href="https://huggingface.co/spaces/fffiloni/DimensionX?duplicate=true"><img src="https://huggingface.co/datasets/huggingface/badges/resolve/main/duplicate-this-space-sm.svg" alt="Duplicate this Space"></a><p> to skip the queue and use custom prompts</div>""")with gr.Row():with gr.Column(scale=2):if is_shared_ui:prompt = gr.Textbox(label="Prompt", info='''Duplicate the space to you personal account for custom prompt''',value="a person, darkblue suit, black tie, white pocket",interactive=False)else:prompt = gr.Textbox(label="Prompt", info='''Describe the subject. Include clothes and hairstyle for more consistency.''',value="a person, darkblue suit, black tie, white pocket",interactive=True)subject = gr.Image(label="Subject", type="filepath"
app.py+24-8