Spaces:
Runtime error
Runtime error
Update app.py
Browse files123456787 unmodified lines161718192021import gradio as grfrom gradio_client import Clientdef get_instantID(portrait_in, prompt):client = Client("https://instantx-instantid.hf.space/")negative_prompt = "(lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, blur, out of focus, blurry, deformed cat, deformed, photo, anthropomorphic cat, monochrome, photo, pet collar, gun, weapon, blue, 3d, drones, drone, buildings in background, green"result = client.predict(portrait_in, # filepath in 'Upload a photo of your face' Image component7 unmodified lines0.8, # float (numeric value between 0 and 1.5) in 'Image adapter strength (for detail)' Slider component5, # float (numeric value between 0.1 and 10.0) in 'Guidance scale' Slider component0, # float (numeric value between 0 and 2147483647) in 'Seed' Slider componentapi_name="/generate_image")print(result)12345678910117 unmodified lines19202122232425import gradio as grfrom gradio_client import Clientimport osht_token = os.environ.get("HF_TKN")def get_instantID(portrait_in, prompt):client = Client("https://fffiloni-instantid.hf.space/", hf_token=hf_token)negative_prompt = "(lowres, low quality, worst quality:1.2), (text:1.2), watermark, (frame:1.2), deformed, ugly, deformed eyes, blur, out of focus, blurry, deformed cat, deformed, photo, anthropomorphic cat, monochrome, photo, pet collar, gun, weapon, blue, 3d, drones, drone, buildings in background, green"result = client.predict(portrait_in, # filepath in 'Upload a photo of your face' Image component7 unmodified lines0.8, # float (numeric value between 0 and 1.5) in 'Image adapter strength (for detail)' Slider component5, # float (numeric value between 0.1 and 10.0) in 'Guidance scale' Slider component0, # float (numeric value between 0 and 2147483647) in 'Seed' Slider componentTrue, # bool in 'Randomize seed' Checkbox componentapi_name="/generate_image")print(result)
app.py+5-1