Spaces:
Configuration error
Configuration error
function defination
Browse files82 unmodified lines8384858687888917 unmodified lines1071081091101111127 unmodified lines120121122123124125126127128129130131132133110 unmodified lines24424524624724824925025125225325482 unmodified lines).images[0]return image@spaces.GPUdef run(self,image: dict[str, PIL.Image.Image],17 unmodified linesimage = self.inference(raw_data, seed)return imagedef create_demo():USAGE = """## To run the demo, you should:7 unmodified lines4. Click the Run button."""model = Model()with gr.Blocks() as demo:gr.HTML("""<h1 style="text-align: center;"><b><i>λ-ECLIPSE</i>: Multi-Concept Personalized Text-to-Image Diffusion Models by Leveraging CLIP Latent Space</b></h1><h1 style='text-align: center;'><a href='https://eclipse-t2i.github.io/Lambda-ECLIPSE/'>Project Page</a> | <a href='#'>Paper</a> </h1><p style="text-align: center; color: red;">This demo is currently hosted on either a small GPU or CPU. We will soon provide high-end GPU support.</p><p style="text-align: center; color: red;">Please follow the instructions from here to run it locally: <a href="https://github.com/eclipse-t2i/lambda-eclipse-inference">GitHub Inference Code</a></p><a href="https://colab.research.google.com/drive/1VcqzXZmilntec3AsIyzCqlstEhX4Pa1o?usp=sharing" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>110 unmodified lines],],inputs=inputs,fn=model.run,outputs=result,)run_button.click(fn=model.run, inputs=inputs, outputs=result)return demo82 unmodified lines83848586878817 unmodified lines1061071081091101111121131141151161177 unmodified lines125126127128129130131132133134135110 unmodified lines24624724824925025125225325425525682 unmodified lines).images[0]return imagedef run(self,image: dict[str, PIL.Image.Image],17 unmodified linesimage = self.inference(raw_data, seed)return imagemodel = Model()@spaces.GPUdef generate_image(image,keyword,image2,keyword2,text,seed):return model.run(image,keyword,image2,keyword2,text,seed)def create_demo():USAGE = """## To run the demo, you should:7 unmodified lines4. Click the Run button."""with gr.Blocks() as demo:gr.HTML("""<h1 style="text-align: center;"><b><i>λ-ECLIPSE</i>: Multi-Concept Personalized Text-to-Image Diffusion Models by Leveraging CLIP Latent Space</b></h1><h1 style='text-align: center;'><a href='https://eclipse-t2i.github.io/Lambda-ECLIPSE/'>Project Page</a> | <a href='#'>Paper</a> </h1><p style="text-align: center; color: red;">Please follow the instructions from here to run it locally: <a href="https://github.com/eclipse-t2i/lambda-eclipse-inference">GitHub Inference Code</a></p><a href="https://colab.research.google.com/drive/1VcqzXZmilntec3AsIyzCqlstEhX4Pa1o?usp=sharing" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>110 unmodified lines],],inputs=inputs,fn=generate_image,outputs=result,)run_button.click(fn=generate_image, inputs=inputs, outputs=result)return demo
app.py+8-6