Spaces:
Configuration error
Configuration error
function defination
Browse files82 unmodified lines8384858686878817 unmodified lines1061071081091101111121131141151161177 unmodified lines125126127123124128129130131132130133134135110 unmodified lines24624724824724925025125225125325425525682 unmodified lines ).images[0] return image
@spaces.GPU def run( self, image: dict[str, PIL.Image.Image],17 unmodified lines image = self.inference(raw_data, seed) return image
model = 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 lines 4. 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, fn=generate_image, outputs=result, )
run_button.click(fn=model.run, inputs=inputs, outputs=result) run_button.click(fn=generate_image, inputs=inputs, outputs=result) return demo
app.py+8-6